1 2004-08-27 Jason Merrill <jason@redhat.com>
4 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
7 * decl.c (expand_static_init): Use thread-safety API.
8 (register_dtor_fn): Return the call, don't expand it.
9 * tree.c (add_stmt_to_compound): New fn.
10 (stabilize_call): Use it.
12 2004-08-27 Richard Henderson <rth@redhat.com>
14 * cp-tree.def (OFFSETOF_EXPR): New.
15 * parser.c (cp_parser_builtin_offsetof): Either built an
16 OFFSETOF_EXPR, or call fold_offsetof immediately.
17 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
19 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
21 * call.c (validate_conversion_obstack): Replace
22 my_friendly_assert with gcc_assert or gcc_unreachable.
23 (direct_reference_binding, merge_conversion_sequences,
24 build_user_type_conversion_1, perform_overload_resolution,
25 build_op_delete_call, enforce_access, call_builtin_trap,
26 build_over_call, build_special_member_call, build_new_method_call,
27 initialize_reference): Likewise.
28 * class.c (build_base_path, build_primary_vtable, alter_access,
29 check_bases, update_vtable_entry_for_fn, layout_empty_base,
30 clone_function_decl, adjust_clone_args,
31 type_requires_array_cookie, include_empty_classes,
32 finish_struct_1, resolve_address_of_overloaded_function,
33 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
34 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
35 accumulate_vtbl_inits, build_vtbl_initializer,
36 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
37 * cvt.c (build_up_reference, convert_to_reference): Likewise.
38 * decl.c (poplevel, duplicate_decls, make_typename_type,
39 cxx_init_decl_processing, reshape_init, check_initializer,
40 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
41 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
42 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
43 xref_basetypes, start_preparsed_function, save_function_data,
44 finish_function, finish_method, maybe_register_incomplete_var,
45 complete_vars): Likewise.
46 * decl2.c (grok_array_decl, check_member_template,
47 check_classfn, finish_static_data_member_decl, coerce_new_type,
48 coerce_delete_type, import_export_class, decl_needed_p,
49 determine_visibility, import_export_decl, build_cleanup,
50 start_static_initialization_or_destructi, do_static_destruction,
51 prune_vars_needing_no_initialization,
52 build_offset_ref_call_from_tree): Likewise.
53 * error.c (dump_decl, dump_expr): Likewise.
54 * init.c (finish_init_stmts, build_zero_init,
55 expand_virtual_init, expand_default_init, expand_aggr_init_1,
56 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
58 * mangle.c (write_method_parms, write_template_args,
59 write_expression, write_template_arg): Likewise.
60 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
61 * name-lookup.c (pop_binding, begin_scope, leave_scope,
62 resume_scope, push_using_decl, validate_nonmember_using_decl,
63 is_ancestor, poplevel_class, set_inherited_value_binding_p,
64 push_class_level_binding, do_class_using_decl, push_namespace,
65 pop_namespace, add_using_namespace, ambiguous_decl,
66 lookup_namespace_name, lookup_type_current_level,
67 maybe_process_template_type_declaration): Likewise.
68 * parser.c (cp_lexer_peek_nth_token,
69 cp_parser_parse_and_diagnose_invalid_typ,
70 cp_parser_translation_unit, cp_parser_template_id,
71 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
72 * pt.c (push_access_scope, finish_member_template_decl,
73 push_inline_template_parms_recursive, add_outermost_template_args,
74 get_innermost_template_args, begin_explicit_instantiation,
75 end_explicit_instantiation, retrieve_specialization,
76 is_specialization_of, is_specialization_of_friend,
77 register_specialization, check_explicit_specialization,
78 comp_template_parms, process_template_parm,
79 process_partial_specialization, convert_nontype_argument,
80 coerce_template_template_parms, coerce_template_parms,
81 mangle_class_name_for_template, lookup_template_function,
82 lookup_template_class, instantiate_class_template, tsubst_decl,
83 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
84 instantiate_template, fn_type_unification, type_unification_real,
85 get_template_base, regenerate_decl_from_template,
86 template_for_substitution, instantiate_decl,
87 get_mostly_instantiated_function_type, dependent_scope_ref_p,
88 value_dependent_expression_p, resolve_typename_type): Likewise.
89 * repo.c (repo_emit_p): Likewise.
90 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
91 create_tinfo_types, emit_tinfo_decl): Likewise.
92 * search.c (lookup_base_r, lookup_base, lookup_field_1,
93 dfs_access_in_type, build_baselink, lookup_member,
94 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
95 * semantics.c (perform_or_defer_access_check,
96 finish_non_static_data_member, finish_stmt_expr_expr,
97 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
98 finish_template_template_parm, finish_member_declaration,
99 emit_associated_thunks): Likewise.
100 * tree.c (build_target_expr_with_type, force_target_expr,
101 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
102 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
103 cxx_sizeof_or_alignof_type, perform_integral_promotions,
104 build_class_member_access_expr, finish_class_member_access_expr,
105 build_ptrmemfunc_access_expr, build_unary_op,
106 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
107 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
108 * typeck2.c (complete_type_check_abstract,
109 abstract_virtuals_error, process_init_constructor,
110 add_exception_specifier): Likewise.
112 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
114 * class.c (build_vtbl_initializer): Use ssize_int.
115 * decl.c (complete_array_type): Likewise.
116 * method.c (finish_thunk): Likewise.
117 * search.c (get_dynamic_base_type): Likewise.
119 2004-08-26 Richard Henderson <rth@redhat.com>
121 * cp-tree.h (DECL_FIELD_IS_BASE): New.
122 * class.c (build_base_field): Set it.
123 (build_simple_base_path): Use it.
124 (fixed_type_or_null): Don't consider base fields definitive.
126 2004-08-25 Roger Sayle <roger@eyesopen.com>
129 PR tree-optimization/16372
130 * decl.c (finish_enum): Make the precision of the enumerated type
131 the same width as the underlying integer type.
133 2004-08-25 Mark Mitchell <mark@codesourcery.com>
136 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
139 * mangle.c (get_identifier_nocopy): Add cast.
141 * cp-tree.h (mangle_type): Remove.
142 * mangle.c (globals): GTY it.
143 (mangle_obstack): New variable.
144 (name_obstack): Likewise.
145 (name_base): Likewise.
146 (write_char): Adjust accordingly.
147 (write_chars): Likewise.
148 (write_string): Likewise.
149 (start_mangling): Initialize G.substitutions only one. Add
151 (finish_mangling): Use VARRAY_CLEAR to reclaim
152 storage in G.substitutions. Use obstack_finish.
153 (init_mangle): Adjust for changes to variable names above.
154 Initialize G.substitutions.
155 (mangle_decl_string): Adjust call to start_mangling.
156 (get_identifier_nocopy): New function.
157 (mangle_decl): Use it.
158 (mangle_type_string): Adjust call to start_mangling.
159 (mangle_special_for_type): Likewise.
160 (mangle_vtt_for_type): Likewise.
161 (mangle_ctor_vtbl_for_type): Likewise.
162 (mangle_thunk): Likewise.
163 (mangle_guard_variable): Likewise.
164 (mangle_ref_init_variable): Likewise.
166 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
169 * pt.c (redeclare_class_template): Check the type of non-type and
170 template template parameter.
172 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
175 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
176 (build_user_type_conversion_1, convert_like_real,
177 build_java_interface_fn_ref, build_special_member_call): Likewise.
178 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
179 * cp-gimplify.c (cp_gimplify_expr): Likewise.
180 * cvt.c (cp_convert_to_pointer): Likewise.
181 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
182 * decl2.c (start_static_initialization_or_destruction,
183 generate_ctor_or_dtor_function): Likewise.
184 * except.c (build_throw): Likewise.
185 * mangle.c (write_integer_cst): Likewise.
186 * method.c (finish_thunk): Likewise.
187 * rtti.c (build_headof, get_tinfo_decl_dynamic,
188 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
189 get_pseudo_ti_init): Likewise.
190 * search.c (get_dynamic_cast_base_type): Likewise.
192 2004-08-25 Zack Weinberg <zack@codesourcery.com>
194 * class.c, search.c: Remove references to DWARF_DEBUG.
196 2004-08-25 Adam Nemet <anemet@lnxw.com>
198 * repo.c (extract_string): Reset backquote after one character.
199 (get_base_filename): Fix indentation.
200 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
202 * decl.c (cxx_init_decl_processing): Adjust
203 build_common_tree_nodes call.
205 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
208 * (is_subobject_of_p): Resurrect & optimize.
209 (lookup_field_r): Use it.
211 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
214 * search.c (friend_accessible_p): Increment processing_template_decl
215 when deal with TEMPLATE_DECL of SCOPE.
217 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
220 * semantics.c (check_accessibility_of_qualified_id): Defer check
221 if qualifying_type is a template parameter.
223 2004-08-23 Mark Mitchell <mark@codesourcery.com>
226 * pt.c (instantiate_decl): Do not try to apply
227 DECL_DECLARED_INLINED_P to a VAR_DECL.
229 * search.c (build_baselink): Fix typo in comment.
231 2004-08-22 Andrew Pinski <apinski@apple.com>
234 2004-08-22 Andrew Pinski <apinski@apple.com>
236 * typeck.c (build_unary_op): Use &a.b if the folded lowered
237 expression is not constant.
239 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
241 * name-lookup.c (pushdecl): Rename build_type_copy call.
242 * tree.c (cp_build_qualified_type_real,
243 build_exception_variant, handle_java_interface_attribute): Likewise.
245 2004-08-22 Andrew Pinski <apinski@apple.com>
248 * typeck.c (build_unary_op): Use &a.b if the folded lowered
249 expression is not constant.
251 2004-08-20 Mark Mitchell <mark@codesourcery.com>
254 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
256 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
259 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
262 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
264 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
265 before calling comp_template_args.
267 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
269 * class.c (build_vtbl_initializer): Use build_int_cst for
271 * decl.c (complete_array_type): Likewise.
272 * method.c (finish_thunk): Likewise.
274 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
276 * tree.c: Remove unused mark_local_for_remap_r.
278 2004-08-19 Eric Christopher <echristo@redhat.com>
280 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
281 * tree.c (cxx_unsave_expr_now): Delete.
282 (cp_unsave_r): Ditto.
284 2004-08-19 Mark Mitchell <mark@codesourcery.com>
287 * pt.c (push_template_decl_real): Disallow template allocation
288 functions with fewer than two parameters.
290 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
292 * cp-tree.h (build_shared_int_cst): Remove.
293 * tree.c (shared_int_cache): Remove.
294 (build_shared_int_cst): Remove.
295 * class.c (finish_struct_1): Use build_int_cst.
297 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
299 * decl.c (finish_enum): Do not copy value node early, copy
301 * lex.c (cxx_init): Force null_node to be unique.
303 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
306 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
307 from input for MODOP_EXPR.
309 2004-08-18 Mark Mitchell <mark@codesourcery.com>
311 * pt.c (dependent_template_p): Fix typo in commment.
314 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
317 2004-08-17 Mark Mitchell <mark@codesourcery.com>
320 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
321 arguments have the same type as the corresponding parameter.
324 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
325 is set use it for diagnostic purposes.
326 (cp_parser_pseudo_destructor_name): Remove special-case error
330 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
333 * cp-tree.h (qualified_name_lookup_error): Add parameter.
334 * name-lookup.c (do_class_using_decl): Restrict set of entities
335 passed to cp_emit_debug_info_for_using more carefully.
336 (lookup_qualified_name): Allow lookup_member to return sets of
338 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
339 (cp_parser_primary_expression): Handle ambiguous lookups.
340 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
341 (cp_parser_template_argument): Likewise.
342 (cp_parser_elaborate_type_specifier): Likewise.
343 (cp_parser_namespace_name): Likewise.
344 (cp_parser_class_name): Likewise.
345 (cp_parser_lookup_name_simple): Likewise.
346 * pt.c (tsubst_qualified_id): Handle ambiguous results.
347 (tsubst_expr): Likewise.
348 * semantics.c (qualified_name_lookup_error): Add decl paramter.
349 For ambiguous lookups, print candidates.
351 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
354 * pt.c (instantiate_pending_templates): Add int parameter. Don't
356 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
357 * decl2.c (finish_file): Adjust call to
358 instantiate_pending_templates.
360 2004-08-15 Roger Sayle <roger@eyesopen.com>
362 * call.c (build_vfield_ref, build_call, build_conditional_expr,
363 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
364 build_java_interface_fn_ref, build_special_member_call,
365 build_new_method_call, initialize_reference): Replace calls to
366 build with calls to buildN.
367 * class.c (build_base_path, convert_to_base_statically,
368 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
369 build_vtbl_initializer): Likewise.
370 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
371 gimplify_if_stmt, cp_genericize_r): Likewise.
372 * cvt.c (convert_to_void): Likewise.
373 * decl.c (check_initializer, finish_constructor_body,
374 finish_destructor_body): Likewise.
375 * error.c (dump_expr): Likewise.
376 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
378 * init.c (perform_member_init, expand_virtual_init,
379 expand_cleanup_for_base, build_init, expand_default_init,
380 build_offset_ref, decl_constant_value, build_new, build_new_1,
381 build_vec_delete_1, build_vec_init, build_delete,
382 push_base_cleanups, build_vec_delete): Likewise.
383 * mangle.c (write_integer_cst): Likewise.
384 * method.c (thunk_adjust, do_build_copy_constructor,
385 do_build_assign_ref): Likewise.
386 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
387 unify, build_non_dependent_expr): Likewise.
388 * rtti.c (build_headof, build_typeid, ifnonnull,
389 build_dyanmic_cast_1, tinfo_base_init): Likewise.
390 * semantics.c (begin_compound_stmt, finish_call_expr,
391 finish_pseudo_destructor_expr, finish_id_expression,
392 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
393 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
394 array_type_nelts_total, stabilize_call): Likewise.
395 * typeck.c (decay_conversion, build_class_member_access_expr,
396 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
397 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
398 build_x_unary_op, build_unary_op, unary_complex_lvalue,
399 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
400 check_return_expr): Likewise.
401 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
402 split_nonconstant_init, store_init_value, build_m_component_ref):
405 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
407 * call.c (convert_class_to_reference,
408 build_user_type_conversion_1, convert_like_real,
409 build_java_interface_fn_ref, build_special_member_call): Use
411 * class.c (build_vtbl_initializer): Likewise.
412 * cp-gimplify.c (cp_gimplify_expr): Likewise.
413 * cvt.c (cp_convert_to_pointer): Likewise.
414 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
415 * decl2.c (start_static_initialization_or_destruction,
416 generate_ctor_or_dtor_function): Likewise.
417 * except.c (build_throw): Likewise.
418 * lex.c (cxx_init): Likewise.
419 * mangle.c (write_integer_cst): Likewise.
420 * rtti.c (build_headof, get_tinfo_decl_dynamic,
421 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
422 get_pseudo_ti_init): Likewise.
423 * search.c (get_dynamic_cast_base_type): Likewise.
424 * tree.c (build_shared_int_cst): Likewise.
426 2004-08-12 Mark Mitchell <mark@codesourcery.com>
429 * class.c (count_depth_data): New type.
430 (dfs_depth_post): New function.
431 (dfs_depth_q): Likewise.
432 (find_final_overrider_data_s): Change type of vpath.
434 (dfs_find_final_overrider_1): New function.
435 (dfs_find_final_overrider): Use it.
436 (dfs_find_final_overrider_q): Adjust use of vpath.
437 (dfs_find_final_overrider_post): Likewise.
438 (find_final_overrider): Use dfs_depth. Allocate and deallocate
441 2004-08-12 Jan Beulich <jbeulich@novell.com>
443 * parser.c (cp_parser_asm_definition): Properly consume scope operator
444 tokens preceding the clobbers. Don't check for scope operator
445 following inputs. Simplify inputs handling to match that now used for
448 2004-08-11 Mark Mitchell <mark@codesourcery.com>
451 * except.c (build_throw): Allocate cleanup_type and the function
452 for __cxa_throw separately.
455 * call.c (standard_conversion): Do not accept conversions between
456 pointers to members if the class types are unrelated.
459 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
460 char &" instead of just "char &".
463 * pt.c (tsubst): Just return the unknown_type_node.
465 2004-08-11 Mark Mitchell <mark@codesourcery.com>
468 * parser.c (cp_parser_class_specifier): Robustify.
471 * pt.c (tsubst_copy_and_build): Complain about invalid
475 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
476 current_class_ref while tsubsting.
478 2004-08-10 Mark Mitchell <mark@codesourcery.com>
481 * parser.c (cp_parser_init_declarator): Robustify.
483 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
485 * typeck2.c (process_init_constructor): Guard the missing field warning
486 with warn_missing_field_initializers rather than extra_warnings.
488 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
490 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
492 2004-08-05 Mark Mitchell <mark@codesourcery.com>
494 * decl.c (start_preparsed_function): Move determine_visibility
496 * decl2.c (determine_visibility): Incorporate dllexport testing.
498 2004-08-05 Geoffrey Keating <geoffk@apple.com>
500 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
501 means that libstdc++ is needed.
503 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
505 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
507 2004-08-04 Geoffrey Keating <geoffk@apple.com>
509 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
510 than passing it as a parameter to rest_of_decl_compilation.
511 * decl2.c (grokfield): Use set_user_assembler_name.
513 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
515 * decl.c (complete_array_type): Don't gratuitously copy
516 maxindex. Its type is always set.
518 2004-08-04 Paul Brook <paul@codesourcery.com>
520 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
521 * cp-tree.h (struct language_function): Rename x_dtor_label to
523 (dtor_label): Rename ...
524 (cdtor_label): ... to this.
525 * decl.c (begin_constructor_body): Remove.
526 (check_special_function_return_type): Maybe change the return type.
527 (grokdeclarator): Pass the class type.
528 (start_preparsed_function): Constructors may need a return label.
529 (finish_constructor_body, finish_destructor_body): Set the return
531 (begin_function_body): Don't call begin_constructor_body.
532 (finish_function): Don't warn for constructors or destructors.
533 (implicitly_declare_fn): Maybe change the return type.
534 * optimize.c: Include target.h.
535 (maybe_clone_body): Remap the function result.
536 * semantics.c: Include target.h.
537 (finish_return_stmt): Maybe jump to return label for constructors.
539 2004-08-03 Mark Mitchell <mark@codesourcery.com>
541 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
542 (check_field_decls): Or here.
543 (check_methods): Or here.
544 (initialize_array): Don't mess with DECL_CONTEXT.
545 * cp-tree.h (start_decl): Adjust prototype.
546 (determine_visibility): New function.
547 * decl.c (duplicate_decls): Remove checks for hidden "operator
549 (build_library_fn_1): Give all library functions default
551 (start_decl): Add pop_scope_p parameter. Tidy.
552 (cp_finish_decl): Do not pop scopes here. Call
553 determine_visibility for variable definitions.
554 (start_preparsed_function): Call determine_visibility.
555 * decl2.c (determine_visibility): New function.
556 * method.c (use_thunk): Fix formatting.
557 * parser.c (cp_parser_condition): Adjust calls to start_decl.
558 (cp_parser_init_declarator): Likewise.
559 * pt.c (instantiate_decl): Always call pop_nested_class.
560 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
561 (tinfo_base_init): Likewise.
563 2004-08-02 Mark Mitchell <mark@codesourcery.com>
566 * name-lookup.c (validate_nonmember_using_decl): Robustify.
568 2004-08-01 Mark Mitchell <mark@codesourcery.com>
571 * name-lookup.c (decl_namespace): Remove.
572 (current_decl_namespace): Use decl_namespace_context instead of
574 (push_decl_namespace): Likewise.
575 (arg_assoc_class): Likewise.
576 (arg_assoc_type): Likewise.
577 * pt.c (check_specialization_namespace): New function.
578 (maybe_process_partial_specialization): Use it.
579 (register_specialization): Likewise.
582 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
583 * call.c (null_ptr_cst_p): Handle variables with constant
585 * pt.c (convert_nontype_argument): Use
586 DECL_INTEGRAL_CONSTANT_VAR_P.
587 * semantics.c (finish_id_expression): Likewise.
590 * decl.c (duplicate_decls): Reject duplicate namespace
594 * typeck.c (build_ptrmemfunc): Loosen assertion.
596 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
598 * call.c (z_candidate::template_decl): Rename from template.
599 (add_template_candidate_real): Adjust member reference.
602 2004-07-29 Mark Mitchell <mark@codesourcery.com>
604 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
605 (lang_decl_flags): Narrow the width of "languages". Add
607 (DECL_NEEDED_P): Remove.
608 (FOR_EACH_CLONE): New macro.
609 (DECL_REPO_AVAILABLE_P): Likewise.
610 (DECL_TINFO_P): Likewise.
611 (set_linkage_according_to_type): Declare.
612 (import_export_vtable): Remove.
613 (import_export_tinfo): Likewise.
614 (mark_needed): New function.
615 (decl_needed_p): Likewise.
616 (note_vauge_linkage_fn): Likewise.
617 (init_repo): Change prototype.
618 (repo_template_used): Remove.
619 (repo_template_instantiated): Likewise.
620 (repo_emit_p): New function.
621 (repo_export_class_p): Likewise.
622 (no_linkage_check): Change prototype.
623 * class.c (set_linkage_according_to_type): New function.
624 (build_vtable): Use it. Do not call import_export_vtable. Set
625 DECL_IGNORED_P if appropriate.
626 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
627 (make_rtL_for_nonlocal_decls): Check for template instantiations
629 (grokfndecl): Adjust call to no_linkage_check.
630 (set_linkage_for_static_data_member): New function.
631 (grokvardecl): Use it. Adjust call to no_linkage_check.
632 (grokdeclarator): Use set_linkage_for_static_data_member.
633 * decl2.c (note_vague_linkage_fn): New function.
634 (note_vague_linkage_var): Likewise.
635 (finish_static_data_member_decl): Use it.
636 (import_export_vtable): Remove.
637 (import_export_class): Use repo_export_class_p.
638 (var_finalized_p): Simplify.
639 (maybe_emit_vtables): Simplify.
640 (mark_needed): New function.
641 (decl_needed_p): Likewise.
642 (import_export_decl): Add documentation and consistency checks.
643 Use repo_emit_p. Handle virtual tables and RTTI information
645 (import_export_tinfo): Remove.
646 (write_out_vars): Call import_export_decl.
647 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
649 (finish_file): Use decl_needed_p. Do not call import_export_decl
650 for undefined static data members. Do not warn about undefined
651 inlines when using a repository.
652 (mark_used): Use note_vague_linkage_fn. Always defer template
654 * lex.c (cxx_init): Adjust call to init_repo. Always set
656 * method.c (synthesize_method): Remove unncessary
657 import_export_decl call.
658 (implicitly_declare_fn): Use set_linkage_according_to_type.
659 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
660 * pt.c (instantiate_class_template): Don't redundantly add classes
661 to keyed_classes. Don't call repo_template_used.
662 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
663 templates with internal linkage.
664 (check_instantiated_args): Adjust call to no_linkage_check.
665 (instantiate_template): Use FOR_EACH_CLONE.
666 (mark_definable): New function.
667 (mark_decl_instantiated): Use it.
668 (do_decl_instantiation): Adjust tests for explicit instantiation
669 after "extern template".
670 (instantiate_class_member): Do not use repo_template_instantiated.
671 (do_type_instantiation): Simplify.
672 (instantiate_decl): Use mark_definable. Check repo_emit_p.
674 * repo.c (repo_get_id): Remove.
675 (original_repo): Remove.
676 (IDENTIFIER_REPO_USED): Remove.
677 (IDENTIFIER_REPO_CHOSEN): Remove.
678 Remove all #if 0'd code.
679 (repo_template_used): Remove.
680 (repo_template_instantiated): Remove.
681 (temporary_obstack_initialized_p): New variable.
682 (init_repo): Register with lang_post_pch_load. Avoid creating
683 identifiers unnecessarily. Don't use original_repo. Close the
685 (reopen_repo_file_for_write): Not here.
686 (finish_repo): Always write out a new repository file.
687 (repo_emit_p): New function.
688 (repo_export_class_p): Likewise.
689 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
690 (involves_incomplete_p): New function.
691 (tinfo_base_init): Use it.
692 (ptr_initializer): Remove non_public_ptr parameter.
693 (ptm_initializer): Likewise.
694 (get_pseudo_ti_init): Likewise.
695 (unemitted_tinfo_decl_p): Remove.
696 (emit_tinfo_decl): Use import_export_decl.
697 * semantics.c (expand_body): Move updates of static_ctors and
699 (expand_or_defer_fn): ... here.
700 * tree.c (no_linkage_check): Add relaxed_p parameter.
702 2004-07-28 Eric Christopher <echristo@redhat.com>
704 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
706 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
708 * cp-tree.h (struct tree_pair_s): New.
709 (typedef tree_pair_p): New.
710 (DEF_VEC_O(tree_pair_s)): New.
711 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
712 (CLASSTYPE_VCALL_INDICES): Update documentation.
713 * class.c (get_vcall_index): Adjust.
714 (add_vcall_offset): Adjust.
716 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
718 * pt.c, typeck.c: Remove spurious carriage returns.
720 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
723 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
724 when the type of ARG is not dependent.
726 2004-07-26 Geoffrey Keating <geoffk@apple.com>
728 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
729 (lang_specific_driver): If the C++ or math library options don't
730 start with '-l', don't count them as added libraries.
732 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
734 * decl.c (xref_basetypes): Adjust base access vector creation.
735 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
737 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
739 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
740 Brian Ryner <bryner@brianryner.com>
744 * class.c (check_field_decls): Apply hidden visibility if
745 -fvisibility-inlines-hidden and inlined unless otherwise specified
746 (build_vtable): Set vtable visibility to class visibility.
747 (check_field_decls): Default static member visibility to class
749 (check_methods): Default method visibility to class visibility.
750 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
751 CLASSTYPE_VISIBILITY_SPECIFIED macro.
752 * decl.c (duplicate_decls): New logic for merging definition decls
753 with declaration decls. Added ignore & warning when non default
754 applied to global operator new or delete.
755 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
756 wherever VISIBILITY was changed
757 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
759 (tinfo_base_init): Set typeinfo name visibility to class visibility.
761 2004-07-25 Bernardo Innocenti <bernie@develer.com>
763 * decl.c: Rename all identifiers named `class' to `cl'.
764 * cp-tree.h: Likewise.
766 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
768 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
769 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
770 * name-lookup.c (binding_entry_make): Use GGC_NEW.
771 (binding_table_construct): Use GGC_CNEWVEC.
772 (binding_table_new): Use GGC_NEW.
773 (cxx_binding_make): Likewise.
774 (begin_scope): Likewise.
775 (push_to_top_level): Use GCC_CNEW.
776 * parser.c (cp_token_cache_new): Likewise.
777 (cp_token_cache_push_token): Likewise.
778 (cp_lexer_new_main): Likewise.
779 (cp_lexer_new_from_tokens): Likewise.
780 (cp_parser_context_new): Likewise.
781 (cp_parser_new): Likewise.
782 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
783 * lex.c (cxx_make_type): Use GGC_CNEW.
784 (retrofit_lang_decl): Use GGC_NEWVAR.
785 (cxx_dup_lang_specific_decl): Likewise.
786 (copy_lang_type): Likewise.
787 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
788 (save_function_data): Likewise.
789 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
790 (cxx_push_function_context): Likewise.
792 2004-07-25 Richard Henderson <rth@redhat.com>
794 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
795 DECL_IGNORED_P on RESULT_DECL.
796 * semantics.c (finalize_nrv): Copy them too.
798 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
800 * search.c (lookup_conversion_operator): Avoid two loops.
801 (add_conversions): Remove.
802 (check_hidden_convs, split_conversions,
803 lookup_conversions_r): New.
804 (lookup_conversions): Use lookup_conversions_r.
806 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
808 * pt.c (get_template_base): Check type is completable.
810 2004-07-21 Eric Christopher <echristo@redhat.com>
812 * decl.c (poplevel): Inline unused variable checking.
815 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
817 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
820 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
823 * pt.c (check_explicit_specialization): Remove extension to accept
824 specializations without template headers. Fall-through to normal
827 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
830 * pt.c (determine_specialization): New parameter template_count.
831 Disambiguate between member templates and member functions counting
832 the template headers.
833 (check_explicit_specialization): Update caller.
834 (tsubst_friend_function): Likewise.
836 2004-07-20 Steven Bosscher <stevenb@suse.de>
838 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
839 * cp-tree.h (tinst_level_t): New tree type.
840 (union lang_tree_node): Handle it.
841 (TINST_LOCATION): New accessor macro.
842 (make_tinst_level): New prototype.
843 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
844 * decl.c (cp_tree_node_structure): Likewise.
845 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
846 (print_instantiation_partial_context): Likewise.
847 * pt.c (pop_tinst_level): Likewise.
848 (push_tinst_level): Use make_tinst_level.
849 * tree.c (make_tinst_level): New function.
850 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
852 2004-07-20 Mark Mitchell <mark@codesourcery.com>
854 * parser.c (cp_parser_simple_type_specifier): Fix typo.
857 * parser.c (cp_parser_simple_type_specifier): Do not record usage
858 of globally-qualified names.
860 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
863 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
866 2004-07-19 Mark Mitchell <mark@codesourcery.com>
869 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
870 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
871 * class.c (add_implicitly_declared_members): Use
872 CLASSTYPE_LAZY_ASSIGNMENT_OP.
873 * method.c (lazily_declare_fn): Clear
874 CLASSTYPE_LAZY_ASSIGNMENT_OP.
875 * search.c (lookup_fnfields_1): Check it.
877 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
879 * cp-tree.h (vec_binfo_member): Remove.
880 * tree.c (vec_binfo_member): Remove.
882 * cp-tree.h (struct lang_type_class): Remove vfields field.
883 (CLASSTYPE_VFIELDS): Remove.
884 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
885 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
887 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
888 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
889 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
891 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
893 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
894 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
896 (BINFO_LANG_SLOTS): Remove.
897 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
898 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
899 * class.c (check_bases): Adjust BINFO accessors.
900 (determine_primary_base, finish_struct_bits,
901 maybe_warn_about_overly_private_class, warn_hidden,
902 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
903 warn_about_ambiguous_bases, get_vfield_name,
904 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
905 add_vcall_offset_vtbl_entries_r): Likewise.
906 * dump.c (cp_dump_tree): Likewise.
907 * init.c (sort_mem_initializers, expand_member_init, build_delete,
908 push_base_cleanups): Likewise.
909 * method.c (do_build_copy_constructor, do_build_assign_ref,
910 synthesize_exception_spec): Likewise.
911 name-lookup.c (arg_assoc_class): Likewise.
912 * pt.c (instantiate_class_template,
913 get_template_base_recursive): Likewise.
914 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
915 * typeck2.c (process_init_constructor): Likewise.
916 * search.c (lookup_base_r, dynamic_cast_base_recurse,
917 dfs_access_in_type, dfs_walk_real, look_for_overrides,
918 types_overlap_p, copied_binfo, original_binfo): Likewise.
919 (binfo_for_vtable): Remove
921 2004-07-20 Steven Bosscher <stevenb@suse.de>
923 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
924 thunk_alias, and the access and virtual_offset fields.
925 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
926 * decl.c (finish_case_label): Update c_add_case_node call.
928 2004-07-19 Mark Mitchell <mark@codesourcery.com>
930 Revert patch for PR c++/16623.
932 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
934 * except.c: Remove two spurious carriage returns.
936 2004-07-19 Mark Mitchell <mark@codesourcery.com>
939 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
940 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
941 * class.c (add_implicitly_declared_members): Use
942 CLASSTYPE_LAZY_ASSIGNMENT_OP.
943 * method.c (lazily_declare_fn): Clear
944 CLASSTYPE_LAZY_ASSIGNMENT_OP.
945 * search.c (lookup_fnfields_1): Check it.
947 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
949 * class.c (add_method): Delay adding the slot until the end.
950 (determine_primary_base): Adjust VEC_iterate invokation.
951 (resort_type_method_vec, finish_struct_methods, warn_hidden,
952 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
953 build_vtbl_initializer): Likewise.
954 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
955 build_vbase_delete): Likewise.
956 * method.c (do_build_copy_constructor): Likewise.
957 * name-lookup.c (new_class_binding, print_binding_level,
958 poplevel_class, store_class_bindings, push_to_top_level,
959 pop_from_top_level): Likewise.
960 * pt.c (check_explicit_specialization): Likewise.
961 * search.c (lookup_conversion_operator, lookup_fnfields_1,
962 get_pure_virtuals, add_conversions, dfs_check_overlap,
963 binfo_for_vbase): Likewise.
965 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
968 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
969 innermost set of template arguments during deduction. Simplify.
971 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
973 * typeck.c (build_modify_expr, build_x_modify_expr): Set
974 TREE_NO_WARNING on assignments with an operator other than '='.
976 2004-07-10 Steven Bosscher <stevenb@suse.de>
977 Joseph S. Myers <jsm@polyomino.org.uk>
979 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
980 * decl2.c (grokfield): Don't check current_class_depth via
981 unused TREE_COMPLEXITY.
982 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
983 to avoid the missing parentheses warning.
984 Don't set C_SET_EXP_ORIGINAL_CODE.
986 2004-07-18 Mark Mitchell <mark@codesourcery.com>
988 * tree.c (no_linkage_helper): Remove.
989 (no_linkage_check): Don't use walk_tree_without_duplicates.
991 * mangle.c (write_expression): Issue a sorry for zero-operand
994 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
997 * init.c (build_offset_ref): Build SCOPE_REF with non-null
998 TREE_TYPE for non-dependent names.
999 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
1000 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1001 unknown_type_node as its TREE_TYPE.
1002 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1003 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1004 (dump_expr) <SCOPE_REF case>: Likewise.
1006 2004-07-17 Jason Merrill <jason@redhat.com>
1009 * call.c (type_passed_as): Make the invisible reference type
1011 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1012 cp_genericize_r. Handle invisible reference lowering.
1013 (is_invisiref_parm): New fn.
1014 (cp_genericize): Adjust the types of invisible reference parms.
1015 Don't repeat the walk for clones.
1016 * decl.c (store_parm_decls): Don't generate any code for clones.
1018 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1020 * cp-tree.h (builtin_function): Declare.
1022 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1024 * class.c (finish_struct_methods): Remove unncessary code.
1025 (add_implicitly_declared_members): Create declarations for default
1026 constructors and copy constructors lazily.
1027 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1029 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1030 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1031 * decl2.c (check_classfn): Robustify.
1032 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1033 (locate_ctor): Handle lazy default constructors.
1034 (locate_copy): Handle lazy copy constructors.
1035 (implicitly_declare_fn): Make sure we're looking at the
1036 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1037 set TYPE_HAS_CONSTRUCTOR.
1038 (lazily_declare_fn): New function.
1039 * name-lookup.c (constructor_name_full): Simplify.
1040 * search.c (lookup_fnfields_1): Lazily create methods, as
1042 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1044 2004-07-16 Steven Bosscher <stevenb@suse.de>
1046 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1047 single bit GTY desc.
1049 2004-07-16 Richard Henderson <rth@redhat.com>
1051 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1052 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1053 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1055 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1057 * class.c (finish_struct_bits): Use for loop.
1058 (propagate_binfo_offsets): Do primary binfo outside of loop.
1061 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1064 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1066 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1068 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1069 has_abstract_assign_ref. Make methods a VEC(tree) *.
1070 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1071 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1072 (CLASSTYPE_DESTRUCTORS): Likewise.
1073 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1074 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1075 (add_method): Change prototoype.
1076 * class.c (add_method): Remove error_p parameter. Adjust for
1077 changes to CLASSTYPE_METHOD_VEC.
1078 (handle_using_decl): Adjust call to add_method.
1079 (maybe_warn_about_overly_private_class): Adjust for
1080 changes to CLASSTYPE_METHOD_VEC.
1081 (resort_type_method_vec): Likewise.
1082 (finish_struct_methods): Likewise.
1083 (check_for_override): Likewise.
1084 (warn_hidden): Likewise.
1085 (add_implicitly_declared_members): Defer creation of assignment
1086 operators. Adjust call to add_method.
1087 (clone_function_decl): Adjust call to add_method.
1088 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1089 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1090 * decl.c (grok_special_member_properties): Don't set
1091 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1092 * decl2.c (check_classfn): Adjust for
1093 changes to CLASSTYPE_METHOD_VEC.
1094 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1095 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1096 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1097 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1099 * pt.c (check_explicit_specialization): Adjust for
1100 changes to CLASSTYPE_METHOD_VEC.
1101 (instantiate_class_template): Do not set
1102 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1103 * ptree.c (cxx_print_type): Don't try to print
1104 CLASSTYPE_METHOD_VEC.
1105 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1106 * search.c (lookup_field_r): Adjust for
1107 changes to CLASSTYPE_METHOD_VEC.
1108 (lookup_fnfields): Likewise.
1109 (lookup_conversion_operator): Likewise.
1110 (lookup_fnfields_1): Likewise. Create assignment operators
1112 (look_for_overrides_here): Adjust for
1113 changes to CLASSTYPE_METHOD_VEC.
1114 (add_conversions): Likewise.
1115 * semantics.c (finish_member_declaration): Adjust call to add_method.
1117 2004-07-15 Jason Merrill <jason@redhat.com>
1119 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1120 references and pointers are compatible.
1122 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1124 * decl.c (xref_basetypes): Refactor.
1125 * tree.c (copy_base_binfos): Replace with ...
1126 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1127 bases of the given base).
1128 * cp-tree.h (copy_base_binfo): Remove.
1129 (copy_binfo): Declare.
1131 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1133 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1135 (get_class_binding): Adjust.
1136 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1138 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1140 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1141 * decl.c (xref_basetypes): Set it here.
1143 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1144 Don't check for incomplete base.
1145 (get_vfield_name): Simplify while loop.
1146 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1148 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1150 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1152 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1153 (BINFO_PUSHDECLS_MARKED): Likewise.
1154 (maybe_inject_for_scope_var): Likewise.
1155 (push_class_decls): Likewise.
1156 * name-lookup.h (push_class_binding): Remove.
1157 (innermost_non_namespace_value): New function.
1158 (outer_binding): Likewise.
1159 * class.c (add_method): Push bindings before adding to
1161 (restore_class_cache): Do not restore class_shadowed.
1162 (pushclass): Do not add USING_DECLs. Do not call
1164 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1165 * decl.c (pushdecl): Use outer_binding.
1166 (poplevel): Set the scope for an out-of-scope for-loop declaration
1168 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1169 * name-lookup.c (new_class_binding): New function.
1170 (push_binding): Use it.
1171 (pushdecl): Use innermost_non_namespace_value.
1172 (maybe_inject_for_scope_var): Remove.
1173 (push_class_binding): Remove.
1174 (set_inherited_value_binding_p): New function.
1175 (get_class_binding): New function.
1176 (push_class_level_binding): Assert that the current_class_type is
1178 (outer_binding): New function.
1179 (innermost_non_namespace_value): Likewise.
1180 (lookup_name_real): Use outer_binding.
1181 (lookup_name_current_level): Ignore out-of-scope variables.
1182 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1183 (lookup_template_class): Likewise.
1184 * search.c (dfs_push_type_decls): Remove.
1185 (dfs_push_decls): Likewise.
1186 (setup_class_bindings): Likewise.
1187 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1188 (marked_pushdecls_p): Remove.
1189 (unmarked_pushdecls_p): Remove.
1190 (marked_identifiers): Remove.
1191 (setup_class_bindings): Remove.
1192 (dfs_push_type_decls): Remove.
1193 (dfs_push_decls): Remove.
1194 (push_class_decls): Remove.
1196 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1200 * decl.c (grokvardecl): Make declspecs parameter const.
1201 (grokdeclarator): Likewise. Adjust accordingly.
1202 * decl.h (grokdeclarator): Adjust declaration.
1203 * parser.c (cp_parser_init_declarator): Do not clear
1204 decl_specifiers->attributes.
1206 * cp-tree.h (lang_identifier): Remove class_value.
1207 (IDENTIFIER_CLASS_VALUE): Remove.
1208 (pop_class_decls): Likewise.
1209 (init_search_processing): Likewise.
1210 * class.c (handle_using_decl): Use lookup_member, not
1211 IDENTIFIER_CLASS_VALUE.
1212 (restore_class_cache): New function, split out from ...
1213 (pushclass): ... here. Do not call clear_identifier_class_values.
1214 (invalidate_class_lookup_cache): Do not clear
1215 IDENTIFIER_CLASS_VALUE.
1216 (popclass): Do not call pop_class_decls.
1217 (maybe_note_name_used_in_class): Do not save names looked up after
1218 the class is complete. Use lookup_member, not
1219 IDENTIFIER_CLASS_VALUE.
1220 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1221 * decl.c (cxx_init_decl_processing): Do not call
1222 init_search_processing.
1223 * method.c (do_build_copy_constructor): Remove unnecessary code.
1224 (do_build_assign_ref): Likewise.
1225 * name-lookup.c (pushdecl): Use lookup_member, not
1226 IDENTIFIER_CLASS_VALUE.
1227 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1229 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1230 (push_class_binding): Do not set it.
1231 (clear_identifier_class_values): Remove.
1232 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1233 (store_binding): Do not save it.
1234 (pop_from_top_level): Do not restore it.
1235 * name-lookup.h (cxx_saved_binding): Remove class_value.
1236 (clear_identifier_class_values): Remove.
1237 * ptree.c (cxx_print_identifier): Do not print
1238 IDENTIFIER_CLASS_VALUE.
1239 * search.c (search_obstack): Remove.
1240 (push_stack_level): Remove.
1241 (pop_stack_level): Remove.
1242 (search_level): Remove.
1243 (search_stack): Remove.
1244 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1245 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1246 IDENTIFIER_CLASS_VALUE.
1247 (marked_identifiers): New variable.
1248 (push_class_decls): Clear IDENTIFIER_MARKED.
1249 (pop_class_decls): Don't call pop_search_level.
1250 (init_search_processing): Remove.
1252 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1254 * cp-tree.h (get_aggr_typedef): Remove.
1255 * init.c (get_aggr_typedef): Likewise.
1257 * name-lookup.c (push_class_level_binding): Simplify.
1259 2004-07-12 Andrew Pinski <apinski@apple.com>
1263 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1265 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1268 2004-07-12 Eric Christopher <echristo@redhat.com>
1270 * parser.c (cp_parser_class_head): Remove unused variable.
1272 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1274 * decl.c (grok_op_properties): Reject [de-]allocation functions
1275 declared in a namespace, or declared as static.
1277 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1279 * cp-tree.h (make_binfo): Remove.
1280 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1281 * tree.h (copy_base_binfos): Likewise.
1282 (make_binfo): Remove.
1284 * call.c (build_user_type_conversion_1, build_new_op,
1285 check_constructor_callable, build_temp,
1286 perform_direct_initialization_of_possible): Pass type directly to
1287 lookup_fnfields & build_special_member_call.
1288 (build_special_member_call): Accept a type, and complete it.
1289 * class.c (finish_stuct_bits): Copy the BINFOs here.
1290 * cvt.c (ocp_convert): Pass type directly to
1291 build_special_member_call.
1292 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1293 (xref_basetypes): Allocate the binfo here. Adjust.
1294 * init.c (build_init, build_new_1): Pass type directly to
1295 build_special_member_call.
1296 * lex.c (cxx_make_type): Do not allocate binfo here.
1297 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1298 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1299 * pt.c (instantiate_class_template): Likewise. Inhibit access
1300 checking for template friends.
1301 * ptree.c (cxx_print_type): Adjust record printing.
1302 * search.c (lookup_base): When taking a type, complete it before
1303 looking for a binfo.
1304 (lookup_member): Delay completing a type.
1305 (push_class_decls): Don't walk an incomplete type.
1306 (lookup_conversions): Likewise.
1307 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1308 build_special_member_call.
1309 * tree.c (copy_base_binfos): Adjust.
1310 (make_binfo): Likewise.
1311 * typeck.c (build_modify_expr): Pass type directly to
1312 build_special_member_call.
1313 * typeck2.c (process_init_constructor): Check a binfo exists.
1314 (build_m_component_ref): Allow accessing an incomplete type.
1315 (build_functional_cast): Pass type directly to
1316 build_special_member_call.
1318 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1321 * config-lang.in (gtfiles): Add typeck2.c.
1322 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1324 * cp-tree.h: Declare complete_type_check_abstract.
1325 * typeck2.c (pat_calc_hash, pat_compare,
1326 complete_type_check_abstract): New functions.
1327 (abstract_virtuals_error): If the type is abstract, register the
1328 declaration within abstract_pending_vars for further checks.
1329 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1330 * decl.c (cp_finish_decl): Do not strip array types.
1331 (create_array_type_for_decl): Check for abstractness of the element
1333 (complete_vars): Call complete_type_check_abstract.
1334 * class.c (finish_struct): Prepare a list of virtual functions for
1335 template types, and call complete_vars on it to check for abstractness.
1337 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1339 PR tree-optimization/14107
1340 * decl.c (finish_function): Remove temporary band-aid.
1342 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1344 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1345 (build_new_op): Adjust call to lookup_function_nonclass.
1346 * name-lookup.c (identifier_type_value): Adjust call to
1348 (lookup_name_real): Add block_p parameter.
1349 (lookup_name_nonclass): Adjust call to lookup_name_real.
1350 (lookup_function_nonclass): Likewise.
1351 (lookup_name): Likewise.
1352 * name-lookup.h (lookup_name_real): Change prototype.
1353 (lookup_name_nonclass): Likewise.
1354 * parser.c (cp_parser_lookup_name): Likewise.
1356 * cp-tree.h (saved_scope): Make old_bindings a vector.
1357 (unuse_fields): Remove.
1358 * name-lookup.h (cxx_saved_binding): Define it.
1359 * class.c (pushclass): Don't use unuse_fields.
1360 * name-lookup.c (cxx_saved_binding_make): Remove.
1361 (store_binding): Add new bindings to a vector, using an
1362 accumulator style, rather than adding them to a list.
1363 (store_bindings): Adjust accordingly.
1364 (store_class_bindings): Likewise.
1365 (push_to_top_level): Likewise.
1366 (pop_from_top_level): Likewise.
1367 * optimize.c (maybe_clone_body): Must push_to_top_level and
1368 pop_from_top_level calls outside of loop.
1369 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1370 calls here from cp_parser_late_parsing_default_args.
1371 (cp_parser_save_default_args): Record the class type in which the
1372 function is declared.
1373 (cp_parser_late_parsing_default_args): Do not call
1374 push_nested_class/pop_nested_class.
1375 * search.c (dfs_unuse_fields): Remove.
1376 (unuse_fields): Remove.
1378 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1380 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1381 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1382 * cp-tree.h (poplevel): Declare.
1383 (set_block): Remove.
1384 * decl.c (set_block): Remove.
1386 2004-07-10 Mike Stump <mrs@apple.com>
1388 * decl2.c (import_export_class): Never export/import vtables
1389 with inline key functions.
1391 2004-07-09 Steven Bosscher <stevenb@suse.de>
1393 * typeck.c (c_expand_asm_operands): Remove.
1395 2004-07-09 Mike Stump <mrs@apple.com>
1397 * typeck.c (build_class_member_access_expr): Skip null deref
1398 warning when we don't dereference it.
1400 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1404 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1405 warn for pointers to functions/members, or for classes without
1408 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1410 * name-lookup.h (struct cp_binding_level): Update documentation
1413 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1416 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1417 returning CALL_EXPR, and non-reference return type.
1419 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1421 * name-lookup.c (push_binding): Use VEC_reserve.
1423 2004-07-08 Richard Henderson <rth@redhat.com>
1425 * cp-tree.h (expand_eh_spec_block): Remove.
1427 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1429 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1430 x_previous_class_values; add x_previous_class_level.
1431 (previous_class_type): Remove.
1432 (previous_class_values): Remove.
1433 (previous_class_level): New macro.
1434 * class.c (pushclass): Restore the identifier cache more
1436 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1437 previous_class_values.
1438 * decl.c (poplevel): Likewise.
1439 * name-lookup.c (cxx_binding_init): New function.
1440 (cxx_binding_make): Use it.
1441 (push_binding): For a binding in a class level, use a vector of
1442 cp_class_binding nodes.
1443 (push_binding_level): New function.
1444 (begin_scope): Use it.
1445 (leave_scope): Do not put class binding levels on the free list.
1446 (print_binding_level): Adjust for the fact that class_shadowed is
1448 (poplevel_class): Likewise.
1449 (clear_identifier_class_values): Likewise.
1450 (push_class_level_binding): Likewise.
1451 (set_class_shadows): Remove.
1452 (store_binding): New function.
1453 (store_class_bindings): New function.
1454 (push_to_top_level): Use store_class_bindings as appropriate.
1455 (pop_from_top_level): Use previous_class_level, not
1456 previous_class_type.
1457 * name-lookup.h (cp_class_binding): New type.
1458 (cp_binding_level): Use a vector object for class_shadowed.
1459 (push_binding_level): Declare.
1460 (set_class_shadows): Remove.
1462 2004-07-07 Andrew Pinski <apinski@apple.com>
1464 * class.c (instantiate_type): BUFFER_REF is dead.
1465 * lex.c (init_operators): IN_EXPR is dead.
1467 2004-07-07 Jason Merrill <jason@redhat.com>
1470 * call.c (build_new_op): Give overload warnings for built-in
1473 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1476 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1479 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1481 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1482 * class.c (build_primary_vtable, check_bases,
1483 determine_primary_base, finish_struct_bits,
1484 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1485 get_basefndecls, warn_hidden, walk_subobject_offsets,
1486 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1487 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1488 finish_struct_1, get_vfield_name, contains_empty_class_p,
1489 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1490 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1491 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1493 * decl.c (xref_basetypes): Likewise.
1494 * dump.c (cp_dump_tree): Likewise.
1495 * error.c (dump_expr): Likewise.
1496 * init.c (sort_mem_initializers, expand_member_init,
1497 push_base_cleanups): Likewise.
1498 * method.c (do_build_copy_constructor, do_build_assign_reg,
1499 synthesize_exception_spec): Likewise.
1500 * name-lookup.c (arg_assoc_class): Likewise.
1501 * pt.c (instantiate_class_template, tsubst,
1502 get_template_base_recursive): Likewise.
1503 * ptree.c (cxx_print_type): Likewise.
1504 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1505 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1506 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1507 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1508 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1509 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1510 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1511 * tree.c (copy_base_binfos, make_binfo): Likewise.
1512 * typeck.c (commmon_base_type): Likewise
1513 * typeck2.c (process_init_constructor): Likewise
1515 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1517 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1519 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1522 * pt.c (convert_nontype_argument): Disallow conversions between
1523 different enumeration types.
1525 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1527 * cp-tree.h (BINFO_MARKED): Remove.
1528 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1529 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1530 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1531 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1532 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1533 (mark_primary_bases, determine_primary_base, base_derived_from,
1534 dfs_find_final_overrider, dfs_find_final_overrider_q,
1535 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1536 dfs_modify_vtables, walk_subobject_offsets,
1537 layout_nonempty_base_or_field, build_base_field,
1538 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1539 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1540 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1541 build_ctor_vtbl_group, accumulate_vtble_inits,
1542 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1543 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1544 add_vcall_offset_vtbl_entries_1): Likewise.
1545 * decl.c (xref_basetypes): Incomming virtual base indicated by
1547 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1548 * init.c (finish_init_stmts, sort_mem_initializers,
1549 emit_mem_initializers, build_vtble_address, expand_member_init,
1550 push_base_cleanups): Likewise.
1551 * method.c (do_build_copy_constructor): Likewise.
1552 * pt.c (instantiate_class_template,
1553 get_template_base_recursive): Likewise.
1554 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1555 get_pseudo_ti_desc): Likewise.
1556 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1557 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1558 original_binfo): Likewise.
1559 * semantics.c (finish_base_specifier): Virtualness is indicated
1561 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1563 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1566 2004-06-24 Jason Merrill <jason@redhat.com>
1568 * decl.c (grokparms): Give the PARM_DECL reference type if the
1569 parameter is passed by invisible reference.
1571 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1573 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1574 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1575 * pt.c (check_instantiated_args, unify): Likewise.
1577 2004-07-05 Phil Edwards <phil@codesourcery.com>
1579 * Make-lang.in (check-c++, lang_checks): Add some comments.
1581 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1583 * cp-mudflap.c: Delete file.
1584 * Makefile.in: Remove all references to cp-mudflap.o.
1586 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1588 * decl.c (cxx_init_decl_processing): Call
1589 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1591 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1594 * call.c (build_operator_new_call): Look only at global scope.
1596 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1598 * call.c (enforce_access): Expect TREE_BINFO.
1599 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1600 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1601 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1603 (BINFO_LANG_ELTS): Remove.
1604 (BINFO_LANG_SLOTS): New.
1605 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1606 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1607 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1608 * search.c (lookup_member): Check TREE_BINFO.
1609 * semantics.c (perform_or_defer_access_check): Likewise.
1610 (check_accessibility_of_qualified_id): Check
1611 deferred_access_no_check.
1612 * tree.c (make_binfo): Use make_tree_binfo.
1614 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1616 * method.c (implicitly_declare_fn): Set linkage of generated
1619 2004-07-04 Richard Henderson <rth@redhat.com>
1621 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1623 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1626 * name-lookup.c (push_class_level_binding): Don't pass a
1627 TREE_LIST of ambiguous names to check_template_shadow as it
1628 only handles declarations. Instead, pull the declaration
1631 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1634 * pt.c (check_explicit_specialization): Clarify error message.
1636 2004-07-02 Richard Henderson <rth@redhat.com>
1638 * tree.c (cp_unsave_r): Update remap_save_expr call.
1640 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1643 * mangle.c (write_template_arg): Correct mangling.
1646 * decl.c (grokdeclarator): Robustify.
1648 2004-07-01 Richard Henderson <rth@redhat.com>
1650 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1651 * method.c (synthesize_method): Don't clear_last_expr.
1652 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1654 2004-07-01 Nick Clifton <nickc@redhat.com>
1656 * decl2.c (import_export_class): Invoke the
1657 import_export_class field in the gcc_target structure if it is not
1660 2004-06-30 Richard Henderson (rth@redhat.com>
1662 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1663 * method.c (use_thunk): Likewise.
1665 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1667 * call.c (build_over_call), typeck.c (build_function_call): Call
1668 check_function_arguments instead of check_function_format.
1670 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1672 * call.c (build_over_call), typeck.c (build_function_call): Update
1673 calls to check_function_format.
1675 2004-06-30 Richard Henderson <rth@redhat.com>
1677 * call.c (build_over_call): Use __builtin_memcpy for copying
1678 CLASS_AS_BASE rather than funny casting.
1680 2004-06-30 Richard Henderson <rth@redhat.com>
1682 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1683 TYPE_SIZE_UNIT of full_type.
1685 2004-06-30 Per Bothner <per@bothner.com>
1687 Conditionally compile support for --enable-mapped_location.
1688 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1689 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1690 adjustments - which I don't understand.
1691 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1692 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1693 (print_instantiation_partial_context): Use expand_location.
1694 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1695 * name-lookup.c: Likewise.
1696 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1697 * name-lookup.c: Use input_line macro.
1698 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1699 (cp_parser_statement): Rename locaal variable statement_locus to
1700 statement_location and use SET_EXPR_LOCATION macro.
1701 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1702 * tree.c (cp_walk_subtrees): Likewise.
1704 2004-06-29 Per Bothner <per@bothner.com>
1706 * tree.c (build_min_nt, build_min, build_min_non_dep):
1707 Don't set TREE_COMPLEXITY from input_line.
1709 2004-06-29 Paul Brook <paul@codesourcery.com>
1711 * init.c: Include target.h.
1712 (get_cookie_size): Remove and replace with target hook.
1714 (build_new_1): Store the element size in the cookie.
1716 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1719 * parser.c (cp_parser_template_declaration_after_export): Disable
1720 access checks here ...
1721 (cp_parser_class_specifier): ... not here.
1723 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1725 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1726 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1727 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1730 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1732 * cp-tree.h (struct deferred_access): Move to ...
1733 * semantics.c (struct deferred_access): ... here. Adjust.
1734 (deferred_access_stack): Make a VEC(deferred_access),
1735 (deferred_access_free_list): Remove.
1736 (deferred_access_no_check): New.
1737 (push_deferring_access_checks, resume_deferring_access_checks,
1738 stop_deferring_access_checks, pop_deferring_access_checks,
1739 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1740 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1742 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1745 * call.c (build_temp): Declare.
1746 (check_constructor_callable): New.
1747 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1748 CONSTRUCTOR_CALLABLE.
1749 (convert_like_real, initialize_reference): Use
1750 check_constructor_callable.
1751 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1752 (LOOKUP_*): Renumber.
1754 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1756 * friend.c (add_friend): Only perform access checks when context
1758 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1759 * parser.c (cp_parser_class_specifier): Disable access checks here
1760 when parsing the body of a templated class.
1761 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1762 NULL binfos when not checking access.
1764 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1766 Use vector API for vbase list.
1767 * cp-tree.h: Include vec.h
1768 (DEF_VEC_P (tree)): New type.
1769 (struct lang_type_class): Change vbase's member type.
1770 (binfo_for_vbase): Declare.
1771 * class.c (determine_primary_base, base_derived_from,
1772 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1773 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1774 build_vtbl_initializer): Adjust.
1775 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1777 * init.c (sort_mem_initializers, expand_member_init,
1778 push_base_cleanups): Adjust.
1779 * method.c (do_build_copy_constructor): Adjust.
1780 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1781 (binfo_for_vbase): New.
1782 * tree.c (copy_base_binfos): Adjust.
1784 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1786 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1788 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1791 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1792 paranthesis in case of pointers to array members.
1793 * error.c (dump_type_prefix): Likewise.
1794 (dump_type_suffix): Maybe issue a whitespace when printing
1797 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1800 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1801 redefinition of built-in types.
1803 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1805 * error.c (pp_template_argument_list_start): Remove.
1806 (pp_template_argument_list_end): Likewise.
1807 (pp_separate_with_comma): Use pp_cxx_separate_with.
1808 (reinit_global_formatting_buffer): Remove.
1809 (pp_non_consecutive_character): Likewise.
1810 (dump_scope): Use pp_cxx_colon_colon.
1811 (dump_template_parameter): Use pp_cxx_identifier,
1812 pp_cxx_tree_identifier and pp_cxx_whitespace.
1813 (dump_templat_bindings): Replace use of pp_string with sequence
1814 of pp_cxx_whitespace and pp_equal.
1815 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1816 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1818 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1819 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1820 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1821 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1822 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1823 (dump_decl): Likewise.
1824 (dump_template_decl): Likewise.
1825 (dump_function_decl): Likewise. Set padding as appropriate.
1826 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1828 (dump_exception_spec): Likewise.
1829 (dump_function_name): Use pp_cxx_tree_identifier and
1831 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1832 pp_cxx_end_template_argument_list.
1833 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1834 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1835 pp_cxx_whitespace throughout.
1836 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1838 (dump_unary_op): Likewise.
1839 (reinit_cxx_pp): New function.
1840 (type_as_string); Use it.
1841 (expr_as_string): Likewise.
1842 (decl_as_string); Likewise.
1843 (context_as_string): Likewise.
1844 (lang_decl_name): Likewise.
1845 (decl_to_string): Likewise.
1846 (expr_to_string): Likewise.
1847 (parm_to_string): Likewise.
1848 (type_to_string): Likewise.
1849 (args_to_string): Likewise.
1850 (cv_to_string): Likewise.
1852 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1854 * cp-tree.h (cp_cv_quals): New type.
1855 (cp_declarator): Use it instead of "tree" as appropriate.
1856 (grok_method_quals): Adjust prototype.
1857 (grokclassfn): Likewise.
1858 (do_friend): Likewise.
1859 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1860 (grokdeclarator): Likewise.
1861 * decl2.c (grok_method_quals): Likewise.
1862 (grokclassfn): Likewise.
1863 * friend.c (do_friend): Likewise.
1864 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1865 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1866 (make_pointer_declarator): Likewise.
1867 (make_reference_declarator): Likewise.
1868 (make_ptrmem_declarator): Likewise.
1869 (cp_parser_ptr_operator): Likewise.
1870 (cp_parser_cv_qualifier_seq_opt): Likewise.
1871 (cp_parser_cv_qualifier_opt): Remove.
1872 (cp_parser_new_declarator_opt): Adjust call to
1873 cp_parser_ptr_operator.
1874 (cp_parser_conversion_declaration_opt): Likewise.
1875 (cp_parser_declarator): Use cp_cv_quals, not tree.
1876 (cp_parser_direct_declarator): Likewise.
1878 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1880 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1881 Rename DECL_STMT to DECL_EXPR.
1882 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1883 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1884 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1886 2004-06-26 Jan Hubicka <jh@suse.cz>
1889 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1890 reachability analysis.
1892 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1894 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1897 2004-06-25 Paul Brook <paul@codesourcery.com>
1899 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1900 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1902 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1904 * decl.c (grokdeclarator): Restore error messages about __thread.
1905 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1907 2004-06-24 Jason Merrill <jason@redhat.com>
1910 * decl.c (grokparms): Give the PARM_DECL reference type if the
1911 parameter is passed by invisible reference.
1913 2004-06-24 Andreas Schwab <schwab@suse.de>
1915 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1917 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1919 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1920 (cp/decl.o): Likewise.
1921 (cp/decl2.o): Likewise.
1922 (cp/pt.o): Likewise.
1923 (cp/semantics.o): Likewise.
1924 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1925 * class.c: Do not include lex.h.
1926 (add_implicitly_declared_members): Do not use
1927 adding_implicit_members.
1928 (check_bases_and_members): Do not talk about grok_x_components.
1929 * cp/cp-tree.h (adding_implicit_members): Remove.
1930 (cp_storage_class): New type.
1931 (cp_decl_spec): Likewise.
1932 (cp_decl_specifier_seq): Likewise.
1933 (cp_parameter_declarator): Use it for the decl_specifiers field.
1934 (check_tag_decl): Adjust prototype.
1935 (shadow_tag): Likewise.
1936 (groktypename): Likewise.
1937 (start_decl): Likewise.
1938 (start_function): Likewise.
1939 (start_method): Likewise.
1940 (grok_x_components): Remove.
1941 (grokfield): Adjust prototype.
1942 (grokbitfield): Likewise.
1943 (finish_member_class_template): Remove.
1944 * decl.c: Do not include lex.h.
1945 (adding_implicit_members): Do not define.
1946 (check_tag_decl): Do not use trees to represent decl-specifiers.
1947 (shadow_tag): Likewise.
1948 (groktypename): Likewise.
1949 (start_decl): Likewise.
1950 (grokvardecl): Likewise.
1951 (grokdeclarator): Likewise.
1952 (grokparms): Likewise.
1953 (start_function): Likewise.
1954 (start_method): Likewise.
1955 * decl.h (grokdeclarator): Adjust prototype.
1956 * decl2.c: Do not include lex.h.
1957 (grok_x_components): Remove.
1958 (grokfield): Do not use trees to represent decl-specifiers.
1959 (grokbitfield): Likewise.
1960 * lex.c: Do not include lex.h.
1962 * parser.c: Include target.h.
1963 (clear_decl_specs): New function.
1964 (cp_parser_translation_unit): Do not use trees to represent
1966 (cp_parser_postfix_expression): Likewise.
1967 (cp_parser_new_type_id): Likewise.
1968 (cp_parser_condition): Likewise.
1969 (cp_parser_simple_declaration): Likewise.
1970 (cp_parser_decl_specifier_seq): Likewise.
1971 (cp_parser_function_specifier_opt): Likewise.
1972 (cp_parser_conversion_type_id): Likewise.
1973 (cp_parser_template_parameter): Likewise.
1974 (cp_parser_explicit_instantiation): Likewise.
1975 (cp_parser_type_specifier): Likewise.
1976 (cp_parser_simple_type_specifier): Likewise.
1977 (cp_parser_init_declarator): Likewise.
1978 (cp_parser_type_id): Likewise.
1979 (cp_parser_type_specifier_seq): Likewise.
1980 (cp_parser_parameter_declaration): Likewise.
1981 (cp_parser_member_declaration): Likewise.
1982 (cp_parser_exception_declaration): Likewise.
1983 (cp_parser_function_definition_from_specifiers_and_declarator):
1985 (cp_parser_single_declaration): Likewise.
1986 (cp_parser_save_member_function_body): Likewise.
1987 (cp_parser_friend_p): Likewise.
1988 (cp_parser_set_storage_class): New function.
1989 (cp_parser_set_decl_spec_type): Likewise.
1990 * pt.c: Do not include lex.h.
1991 * semantics.c: Likewise.
1992 (finish_member_class_template): Remove.
1994 2004-06-23 Roger Sayle <roger@eyesopen.com>
1996 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1997 longer take both "args" and "convert_args" as arguments.
1998 (build_op_delete_call): Update call to build_cxx_call.
1999 (build_over_call): Likewise, update call to build_cxx_call.
2000 * cp-tree.h (build_cxx_call): Update funtion prototype.
2001 * typeck.c (build_function_call): Don't call expand_tree_builtin.
2002 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
2003 (throw_bad_typeid): Likewise.
2004 (build_dynamic_cast_1): Likewise.
2006 2004-06-22 Richard Henderson <rth@redhat.com>
2008 * class.c (build_vfn_ref): Take a pointer not object. Build
2010 (cp_fold_obj_type_ref): New.
2011 * call.c (build_over_call): Update build_vfn_ref call.
2012 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2013 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2015 2004-06-21 Jason Merrill <jason@redhat.com>
2018 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2021 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2023 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2024 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2025 (TREE_PARMLIST): Likewise.
2026 (CALL_DECLARATOR_PARMS): Likewise.
2027 (CALL_DECLARATOR_QUALS): Likewise.
2028 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2029 (cp_declarator_kind): New type.
2030 (cp_parameter_declarator): Likewise.
2031 (cp_declarator): Likewise.
2032 (cp_error_declarator): Likewise.
2033 (no_parameters): Likewise.
2034 (groktypename): Change prototype.
2035 (start_decl): Likewise.
2036 (start_handler_parms): Likewise.
2037 (get_scope_of_declarator): Likewise.
2038 (start_function): Likewise.
2039 (start_preparsed_function): New function.
2040 (start_function): Change prototype.
2041 (start_method): Likewise.
2042 (grokfield): Likewise.
2043 (grokbitfield): Likewise.
2044 (build_new): Likewise.
2045 (make_pointer_declarator): Remove.
2046 (make_reference_declarator): Likewise.
2047 (make_call_declarator): Likewise.
2048 (set_quals_and_spec): Likewise.
2049 (process_template_parm): Change prototype.
2050 (begin_function_definition): Remove.
2051 (finish_parmlist): Remove.
2052 * decl.c (groktypename): Do not use trees to represent
2054 (start_decl): Likewise.
2055 (start_handler_parms): Remove.
2056 (get_scope_of_declarator): Reimplement.
2057 (grokdeclarator): Do not use trees to represent declarators.
2058 (grokparms): Likewise.
2059 (start_function): Likewise.
2060 (start_method): Likewise.
2061 (build_void_list_mode): Do not use TREE_PARMLIST.
2062 * decl.h (grokdeclarator): Change prototype.
2063 * decl2.c (grok_method_quals): Robustify.
2064 (grok_x_components): Do not use trees to represent declarators.
2065 (grokfield): Likewise.
2066 (grokbitfield): Likewise.
2067 (start_objects): Build FUNCTION_DECLs, not declarators.
2068 (start_static_storage_duration_function): Likewise.
2069 * init.c (build_new): Simplify.
2070 * lex.c (make_pointer_declarator): Remove.
2071 (make_reference_declarator): Likewise.
2072 (make_call_declarator): Likewise.
2073 (set_quals_and_spec): Likewise.
2074 * method.c (use_thunk): Use start_preparsed_function.
2075 (synthesize_method): Likewise.
2076 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2077 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2078 * parser.c (cp_error_declarator): New variable.
2079 (declarator_obstack): Likewise.
2080 (alloc_declarator): New function.
2081 (make_declarator): Likewise.
2082 (make_id_declarator): Likewise.
2083 (make_pointer_declarator): Likewise.
2084 (make_reference_declarator): Likewise.
2085 (make_ptrmem_declarator): Likewise.
2086 (make_call_declarator): Likewise.
2087 (make_array_declarator): Likewise.
2088 (no_parameters): New variable.
2089 (make_parameter_declarator): Likewise.
2090 (cp_parser_check_for_definition_in_return_type): Do not use trees
2091 to represent declarators.
2092 (cp_parser_translation_unit): Likewise.
2093 (cp_parser_new_expression): Likewise.
2094 (cp_parser_new_type_id): Likewise.
2095 (cp_parser_new_declarator_opt): Likewise.
2096 (cp_parser_direct_new_declarator): Likewise.
2097 (cp_parser_condition): Likewise.
2098 (cp_parser_declaration_statement): Likewise.
2099 (cp_parser_declaration): Likewise.
2100 (cp_parser_conversion_type_id): Likewise.
2101 (cp_parser_conversion_declarator_opt): Likewise.
2102 (cp_parser_template_parameter_list): Likewise.
2103 (cp_parser_template_parameter): Likewise.
2104 (cp_parser_explicit_instantiation): Likewise.
2105 (cp_parser_init_declarator): Likewise.
2106 (cp_parser_declarator): Likewise.
2107 (cp_parser_direct_declarator): Likewise.
2108 (cp_parser_type_id): Likewise.
2109 (cp_parser_parameter_declaration_clause): Likewise.
2110 (cp_parser_parameter_declaration_list): Likewise.
2111 (cp_parser_parameter_declaration): Likewise.
2112 (cp_parser_member_declaration): Likewise.
2113 (cp_parser_exception_declaration): Likewise.
2114 (cp_parser_check_declarator_template_parameters): Likewise.
2115 (cp_parser_function_definition_from_specifiers_and_declarator):
2117 (cp_parser_save_member_function_body): Likewise.
2118 * pt.c (process_template_parm): Add is_non_type parameter.
2119 (convert_template_argument): Adjust call to groktypename.
2120 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2121 (tsubst): Do not expect declarators.
2122 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2124 (instantiate_decl): Use start_preparsed_function.
2125 * semantics.c (begin_function_definition): Remove.
2126 (finish_parmlist): Remove.
2127 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2130 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2132 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2133 (build_new_method_call): Likewise.
2134 * decl.c (local_variable_p_walkfn): Don't walk into types.
2135 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2136 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2137 * init.c (buld_new): Add new operand for ARRAY_REF.
2138 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2139 (do_build_assign_ref): Likewise.
2140 * parser.c (cp_parser_direct_new_declarator): Add new operands
2142 (cp_parser_direct_declarator): Likewise.
2143 * pt.c (tsubst): Likewise.
2144 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2146 * semantics.c (finish_non_static_data_member): Add new operand
2148 * typeck.c (build_class_member_access_expr): Likewise.
2149 (build_class_member_access_expr, finish_class_member_access_expr):
2151 (build_ptrmemfunc_access_expr): Likewise.
2152 (build_array_ref): Add new operands for ARRAY_REF.
2153 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2154 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2156 2004-06-21 Richard Henderson <rth@redhat.com>
2158 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2159 * parser.c (cp_parser_jump_statement): Update commentary.
2160 * pt.c (tsubst_expr): Use RETURN_EXPR.
2161 * semantics.c (finish_return_stmt): Likewise.
2162 (finalize_nrv_r): Likewise.
2163 * typeck.c, typeck2.c: Update file start commentary.
2165 2004-06-21 Richard Henderson <rth@redhat.com>
2167 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2169 2004-06-20 Richard Henderson <rth@redhat.com>
2171 * cp-tree.h (add_decl_stmt): Declare.
2172 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2173 * semantics.c (maybe_cleanup_point_expr): New.
2174 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2175 finish_for_expr, finish_switch_cond): Use it.
2176 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2178 2004-06-20 Richard Henderson <rth@redhat.com>
2180 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2181 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2182 (cp_gimplify_expr): Call it.
2183 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2184 (cp_genericize): New.
2185 * decl.c (finish_function): Call it.
2186 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2187 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2188 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2189 (cp_genericize): Declare.
2190 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2191 * dump.c (cp_dump_tree): Likewise.
2192 * semantics.c (push_cleanup): Move from c-semantics.c.
2194 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2196 * cp-lang.c (has_c_linkage): Implement.
2198 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2199 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2200 (builtin_function_1): Don't call make_decl_rtl.
2201 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2202 (grokvardecl): Don't call mangle_decl.
2203 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2204 DECL_ASSEMBLER_NAME.
2205 * method.c (set_mangled_name_for_decl): Delete.
2206 * name-lookup.c (pushdecl): When a local extern shadows a
2207 file-scope declaration of the same object, give both DECLs the
2209 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2210 on DECL_ASSEMBLER_NAME.
2212 2004-06-19 Richard Henderson <rth@redhat.com>
2214 * cp-gimplify.c: Remove unnecessary prototypes.
2215 (cp_gimplify_stmt): Merge into ...
2216 (cp_gimplify_expr): ... here. Move to end of file. Handle
2217 stmts_are_full_exprs_p frobbing.
2218 * cp-tree.h (cp_gimplify_stmt): Remove.
2219 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2220 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2222 2004-06-18 Richard Henderson <rth@redhat.com>
2225 * semantics.c (begin_cond): New.
2226 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2227 Assume that non-template decls go land before the conditional.
2228 (simplify_loop_decl_cond): Likewise.
2229 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2230 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2231 begin_switch_stmt, finish_switch_cond): Update to match.
2233 2004-06-17 Jason Merrill <jason@redhat.com>
2236 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2237 (finish_stmt_expr_expr): Update type after conversions.
2238 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2239 Handle void initializer.
2240 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2242 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2244 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2245 * cp-tree.h (defer_fn): Delete.
2246 * decl2.c (defer_fn): Delete.
2247 (finish_file): Simplify deferred_fns loops; check that
2248 only used inline functions get into deferred_fns.
2249 (mark_used): Inline previous contents of defer_fn.
2251 2004-06-16 Richard Henderson <rth@redhat.com>
2253 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2254 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2255 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2256 of CTOR_INITIALIZER ...
2257 (pp_cxx_statement): ... here.
2258 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2259 (finish_function): Use alloc_stmt_list to zap entire function.
2260 * parser.c (cp_parser_compound_statement): Update commentary.
2261 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2262 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2263 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2265 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2267 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2269 2004-06-16 Richard Henderson <rth@redhat.com>
2271 * parser.c (cp_parser_labeled_statement): Update commentary.
2272 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2273 * tree.c (mark_local_for_remap_r): Likewise.
2275 2004-06-16 Richard Henderson <rth@redhat.com>
2277 * parser.c (cp_parser_asm_definition): Update commentary.
2278 * pt.c (tsubst_expr): Use ASM_EXPR.
2279 * semantics.c (finish_asm_stmt): Likewise.
2281 2004-06-16 Richard Henderson <rth@redhat.com>
2283 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2284 * parser.c (cp_parser_statement): Update commentary.
2285 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2286 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2287 * tree.c (mark_local_for_remap_r): Likewise.
2289 2004-06-16 Richard Henderson <rth@redhat.com>
2292 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2293 statement in FOR_INIT_STMT for templates.
2295 2004-06-15 Richard Henderson <rth@redhat.com>
2297 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2298 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2299 (genericize_try_block): Use gimplify_stmt.
2300 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2301 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2302 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2303 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2304 (cp_tree_chain_matters_p): Remove.
2305 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2306 (COMPOUND_STMT_BODY_BLOCK): New.
2307 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2308 (EXPR_STMT_STMT_EXPR_RESULT): New.
2309 (building_stmt_tree): Check cur_stmt_list.
2310 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2311 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2312 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2313 (cp_finish_decl): Use push_cleanup.
2314 (start_function, finish_function): Use statement lists.
2315 (finish_stmt): Do nothing.
2316 * except.c (begin_eh_spec_block): Use statement lists.
2317 (check_handlers_1, check_handlers): Likewise.
2318 * init.c (construct_virtual_base): Don't add extra compound stmts.
2319 (build_vec_init): Likewise.
2320 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2321 * name-lookup.h (struct cp_binding_level): Add statement_list.
2322 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2323 (cp_parser_labeled_statement, cp_parser_expression_statement,
2324 cp_parser_statement_seq_opt): Likewise.
2325 (cp_parser_compound_statement): Likewise. Take bool for try block.
2326 (cp_parser_selection_statement): Tidy if processing.
2327 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2328 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2329 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2330 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2331 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2332 (finish_cond): New, rewritten from FINISH_COND.
2333 (simplify_loop_decl_cond): New.
2334 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2335 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2336 begin_else_clause, finish_else_clause, finish_if_stmt,
2337 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2338 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2339 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2340 finish_switch_cond, finish_switch_stmt, begin_try_block,
2341 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2342 finish_handler_sequence, finish_function_handler_sequence,
2343 begin_handler, finish_handler_parms, finish_handler,
2344 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2345 using statement lists.
2346 (begin_compound_stmt): Replace has_no_scope argument with flags.
2347 Update all callers. Use statement lists.
2348 (finish_compound_stmt): Likewise.
2349 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2350 (current_scope_stmt_stack): Remove.
2351 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2352 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2353 Rewrite with statement lists.
2355 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2357 * parser.c: Change all assignments of c_lex_string_translate
2358 to true and false to 1 and 0.
2359 (cp_lexer_read_token): Convert type of the translated string.
2360 (cp_parser_skip_to_closing_parentheses): Preserve original
2361 value of c_lex_string_translate, and set it to -1 while
2363 (cp_parser_cache_group): Likewise.
2364 (cp_parser_cache_group_1): Renamed.
2365 (cp_parser_asm_operand_list): Remove redundant setting of
2366 c_lex_string_translate.
2367 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2368 Handle chained strings.
2370 2004-06-12 Andrew Pinski <apinski@apple.com>
2374 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2376 * cp-tree.h: Fix typo.
2378 * cp-tree.h: Include cgraph.h
2379 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2380 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2382 2004-06-12 Jason Merrill <jason@redhat.com>
2384 PR tree-optimization/14107
2385 * decl.c (finish_function): Warn about no return in all functions.
2387 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2389 * cp-tree.h (struct language_function): Remove cannot_inline.
2390 * decl.c (save_function_data): cannot_inline is no more.
2391 (cxx_push_function_context): Likewise.
2392 * decl2.c (start_objects, start_static_storage_duration_function):
2393 Reset DECL_INLINE, set DECL_UNINLINABLE.
2395 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2398 * search.c (lookup_field): Propagate the ambiguity list.
2399 (lookup_fnfields): Likewise.
2401 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2404 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2405 template keyword to disambiguate.
2407 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2410 * decl.c (grokdeclarator): Ignore pointer-to-members when
2411 computing template depth.
2414 * name-lookup.c (pushtag): Do not try to put class declarations in
2415 explicit specialization scopes.
2417 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2419 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2421 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2424 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2425 bindings for undeclared built-ins.
2427 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2429 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2430 appear at the correct location.
2432 2004-06-10 Jason Merrill <jason@redhat.com>
2436 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2437 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2438 TREE_TYPE for non-dependent names.
2439 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2440 unknown_type_node as its TREE_TYPE.
2441 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2442 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2443 (dump_expr) <SCOPE_REF case>: Likewise.
2445 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2448 * parser.c (cp_parser_direct_declarator): Robustify.
2451 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2452 constants in non-dependent contexts.
2456 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2459 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2462 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2465 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2469 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2470 * lex.c (handle_pragma_interface): Deprecate.
2471 (handle_pragma_implementation): Likewise.
2473 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2475 * g++spec.c (lang_specific_driver): Remove check for -lm
2476 and -lmath when check it see if it was the math library.
2478 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2481 * parser.c (cp_parser_direct_declarator): Reject constructor named
2482 as qualified template-id.
2484 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2487 * lex.c (handle_pragma_interface): Deprecate.
2488 (handle_pragma_implementation): Likewise.
2490 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2493 * parser.c (cp_parser_iteration_statement): Fix typo in error
2497 * pt.c (tsubst_default_argument): Do not defer access checks
2498 while substituting into the default argument.
2501 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2502 constant in a non-dependent context.
2505 * except.c (build_throw): Ensure that temp_expr has been
2508 2004-06-06 Roger Sayle <roger@eyesopen.com>
2510 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2512 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2515 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2516 'typename', and accept 'template'.
2518 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2519 Jan Hubicka <jh@suse.cz>
2522 * method.c (use_think): Do not mark thunk as referenced.
2524 2004-06-03 Matt Austern <austern@apple.com>
2527 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2528 is nonzero, and if we see a noninline definition of a key method,
2529 make the vtables nonweak.
2531 2004-06-02 Matt Austern <austern@apple.com>
2533 * cp-tree.h (instantiate_decl): new boolean parameter,
2534 undefined_ok. Current behavior is equivalent to its being 0.
2535 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2536 * pt.c (mark_decl_instantiated): Unconditionally make
2537 instantiations explicit unconditionally
2538 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2539 since mark_decl_instantiated now does it.
2540 (instantiate_class_member): New. Instantiate a member of an
2541 explicitly instantiated class template.
2542 (do_type_instantiation): Explicitly instantiate members of an
2543 explicitly instantiated class template.
2544 (instantiate_decl): if undefined_ok is nonzero, and if we're
2545 trying to explicitly instantiated a template with no definition,
2546 change it to an implicit instantiation.
2547 (instantiate_pending_templates): Add new argument to instantiate_decl.
2548 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2550 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2552 * cp-tree.h: Fix typo.
2554 * cp-tree.h: Include cgraph.h
2555 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2556 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2558 2004-06-01 Jason Merrill <jason@redhat.com>
2561 * call.c (call_builtin_trap): Remove type parm.
2562 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2563 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2565 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2568 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2569 TREE_TYPE for non-dependent names.
2570 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2571 unknown_type_node as its TREE_TYPE.
2572 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2573 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2574 (dump_expr) <SCOPE_REF case>: Likewise.
2576 2004-06-01 Richard Henderson <rth@redhat.com>
2577 Andrew Pinski <pinskia@physics.uc.edu>
2579 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2580 * parser.c (struct cp_parser): Remove in_offsetof.
2581 (cp_parser_new): Don't set it.
2582 (cp_parser_unary_expression): Don't check it.
2583 (cp_parser_postfix_open_square_expression): Split out from ...
2584 (cp_parser_postfix_expression): ... here.
2585 (cp_parser_postfix_dot_deref_expression): Likewise.
2586 (cp_parser_builtin_offsetof): New.
2587 (cp_parser_primary_expression): Use it.
2589 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2592 * parser.c (cp_parser_postfix_expression): Allow subscript
2593 operator in offsetof.
2595 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2598 * friend.c (add_friend): Do not try to perform access checks for
2599 functions from dependent classes.
2601 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2603 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2604 (pp_cxx_begin_template_argument_list): Turn into a function.
2605 (pp_cxx_end_template_argument_list): Likewise.
2606 (pp_cxx_separate_with): Define.
2607 (pp_cxx_unqualified_id): Tidy.
2608 (pp_cxx_primary_expression): Likewise.
2609 (pp_cxx_postfix_expression): Likewise.
2610 (pp_cxx_expression): Likewise.
2611 (pp_cxx_simple_type_specifier): Likewise.
2612 (pp_cxx_type_specifier_seq): Likewise.
2613 (pp_cxx_parameter_declaration_clause): Likewise.
2614 (pp_cxx_exception_specification): Likewise.
2615 (pp_cxx_direct_declarator): Likewise.
2616 (pp_cxx_type_id): Likewise.
2617 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2619 (pp_cxx_left_paren): Likewise.
2620 (pp_cxx_right_paren): Likewise.
2621 (pp_cxx_left_brace): Likewise.
2622 (pp_cxx_right_brace): Likewise.
2623 (pp_cxx_left_bracket): Likewise.
2624 (pp_cxx_right_bracket): Likewise.
2625 (pp_cxx_dot): Likewise.
2626 (pp_cxx_identifier): Likewise.
2627 (pp_cxx_tree_identifier): Likewise.
2628 (pp_cxx_ampersand): New macro.
2629 (pp_cxx_star): Likewise.
2630 (pp_cxx_arrow): Likewise.
2631 (pp_cxx_semicolon): Likewise.
2632 (pp_cxx_complement): Likewise.
2633 (pp_cxx_begin_template_argument_list): Declaree.
2634 (pp_cxx_end_template_argument_list): Likewise.
2635 (pp_cxx_colon_colon): likewise.
2637 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2639 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2642 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2644 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2645 typeck.c: Fix comment formatting.
2647 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2649 * cp-lang.c (cp_expand_decl): Remove.
2650 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2652 2004-05-30 Andreas Jaeger <aj@suse.de>
2654 * lang-specs.h: Add missing initializers for .ii.
2656 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2658 * decl.c (cp_make_fname_decl): Free return value from
2661 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2664 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2666 * init.c (build_new): Likewise.
2669 * name-lookup.c (arg_assoc): Robustify.
2672 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2673 when determining the scope to use for a pointer to member.
2674 (lookup_anon_field): Give it external linkage.
2675 * cp-tree.h (lookup_anon_field): Declare it.
2676 * expr.c (cplus_expand_constant): Use it.
2678 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2681 * parser.c (cp_parser_simple_type_specifier): Call
2682 maybe_note_name_used_in_class.
2684 2004-05-28 Tom Marshall <tmarshall@real.com>
2687 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2688 the class has friends.
2690 2004-05-27 Adam Nemet <anemet@lnxw.com>
2693 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2694 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2696 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2698 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2699 if it might be needed.
2700 * pt.c (mark_decl_instantiated): Only call defer_fn if
2701 the function actually needs processing in finish_file.
2702 * decl2.c (finish_file): Add check that elements in
2703 deferred_fns_used are really needed there. Remove unnecessary
2704 test of DECL_SAVED_TREE.
2706 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2708 * Make-lang.in: No need to specify $(LIBCPP).
2710 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2713 * parser.c (cp_parser_class_head): Robustify.
2716 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2718 (cp_parser_constructor_declarator_p): Treat attributes
2722 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2723 base classes in templates.
2725 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2728 * pt.c (instantiate_template): Robustify.
2730 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2733 * decl.c (xref_tag): Issue errors about redeclaring template
2734 classes as non-template classes.
2736 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2739 * name-lookup.c (supplement_binding): Allow redefinitions of
2743 * parser.c (cp_parser_template_argument): Robustify.
2745 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2747 * class.c (alter_access): Use %E format specifier to print an
2748 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2749 (push_lang_context): Likewise.
2750 * decl.c (lookup_label): Likewise.
2751 (grokdeclarator): Likewise.
2752 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2753 * pt.c (do_type_instantiation): Likewise.
2754 * tree.c (handle_java_interface_attribute): Likewise.
2755 (handle_com_interface_attribute): Likewise.
2756 (handle_init_priority_attribute): Likewise.
2758 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2762 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2763 recognized as overloaded functions.
2765 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2768 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2769 layout conflicts for unions.
2772 * typeck.c (build_x_unary_op): Instantiate template class
2773 specializations before looking for "operator &".
2776 * typeck.c (complete_type): Layout non-dependent array types, even
2780 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2783 2004-05-22 Roger Sayle <roger@eyesopen.com>
2785 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2786 returning when TREE_TYPE is error_mark_node.
2787 * typeck.c (require_complete_type): Return error_mark_node if
2788 value's type is an error_mark_node.
2790 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2792 * optimize.c (calls_setjmp_r): Remove.
2793 (calls_setjmp_p): Remove.
2794 * cp-tree.c (calls_setjmp_p): Remove.
2795 * decl.c (finish_function): Do not call calls_setjmp_p.
2797 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2799 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2800 * decl2.c (maybe_make_one_only): Likewise.
2801 * method.c (use_thunk): Likewise.
2803 2004-05-18 Jason Merrill <jason@redhat.com>
2805 * class.c (build_base_path): Tidy a bit.
2807 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2809 * name-lookup.c (struct scope_binding): New.
2810 (EMPTY_SCOPE_BINDING): New.
2811 (lookup_using_namespace): Take a scope_binding instead of a
2813 (qualified_lookup_using_namespace): Likewise.
2814 (cxx_binding_clear): Delete.
2815 (do_nonmember_using_decl): Use a scope_binding instead of a
2817 (lookup_tag): Don't call select_decl.
2818 (ambiguous_decl): Don't return anything (and change callers to match).
2819 Take a scope_binding as the second parameter.
2820 (lookup_namespace_name): Use a scope_binding instead of a
2822 (unqualified_namespace_lookup): Likewise.
2823 (lookup_qualified_name): Likewise.
2824 (select_decl): Take a scope_binding instead of a cxx_binding.
2825 Use macros rather than hand-coding tests for type-ness.
2827 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2829 * cp-gimplify.c: Rename from cp-simplify.c.
2830 * Make-lang.in, optimize.c: Update.
2832 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2834 Merge from tree-ssa-20020619-branch. See
2835 ChangeLog.tree-ssa for details.
2837 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2838 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2839 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2840 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2842 * cp-mudflap.c: New file.
2843 * cp-simplify.c:: New file.
2845 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2848 * decl2.c (check_classfn): For member templates, compare also the
2849 template parameters to match the declaration.
2850 * cp-tree.h: Adjust declaration of check_classfn.
2851 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2852 * friend.c (do_friend): Likewise.
2853 * pt.c (tsubst_friend_function): Likewise.
2855 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2857 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2858 Instead, dig into the representation type to find the array bound.
2860 2004-04-30 Jason Merrill <jason@redhat.com>
2862 Refer to base members using COMPONENT_REFs where possible.
2863 * class.c (build_simple_base_path): New fn.
2864 (build_base_path): Use it for non-virtual base references.
2865 (layout_class_type): Change base fields to their real type
2866 after layout is done.
2867 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2868 * cp-lang.c (cxx_get_alias_set): Use it.
2870 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2872 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2875 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2878 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2879 used in integral constant expressions.
2881 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2883 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2886 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2888 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2889 * decl.c (reshape_init): Use it.
2890 * init.c (perform_member_init): Remove redundant condition.
2891 (build_aggr_init): Adjust to handle brace-enclosed initializers
2893 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2895 * parser.c (cp_parser_initializer_clause): Do not set
2896 TREE_HAS_CONSTRUCTOR on the initializer.
2897 * rtti.c (tinfo_base_init): Likewise.
2898 (generic_initializer): Likewise.
2899 (ptr_initializer): Likewise.
2900 (ptm_initializer): Likewise.
2901 (class_initializer): Likewise.
2902 (get_pseudo_ti_init): Likewise.
2903 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2905 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2907 * name-lookup.c (anonymous_namespace_name): Make static.
2909 2004-04-19 Roger Sayle <roger@eyesopen.com>
2912 * class.c (build_base_path): Call fold whilst building the NULL
2913 pointer check expression trees.
2915 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2917 * init.c (build_new_1): Don't use type size argument for Java
2918 _Jv_AllocObject call.
2920 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2922 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2923 declaration and definition.
2925 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2928 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2929 than ASM_OUTPUT_DEF.
2931 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2933 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2934 current_function_decl == NULL.
2936 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2939 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2942 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2944 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2946 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2947 or TREE_SIDE_EFFECTS of a type.
2949 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2952 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2953 cv-qualifier unification.
2954 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2956 2004-04-02 Jan Hubicka <jh@suse.cz>
2958 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2959 * cp-tree.h (cp_update_decl_after_saving): Declare.
2960 * tree.c (cp_update_decl_after_saving): Define.
2962 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2965 * typeck.c (get_delta_difference): Call fold before returning the
2968 2004-04-01 Richard Henderson <rth@redhat.com>
2971 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2972 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2974 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2977 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2979 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2981 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2983 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2985 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2986 * class.c (check_bitfield_decl): Likewise.
2987 * cvt.c (type_promotes_to): Likewise.
2988 * decl.c (finish_enum): Likewise.
2989 * mangle.c (write_builtin_type): Likewise.
2990 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2991 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2992 (build_binary_op): Likewise.
2994 2004-03-31 Jan Hubicka <jh@suse.cz>
2996 * tree.h (optimize_function): Kill prototype.
2997 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2998 * semantics.c (expand_body): Kill.
3000 2004-03-30 Mark Mitchell <mark@codesourcery.com>
3003 * decl.c (start_decl_1): Do not decide whether or not to create a
3004 new cleanup level until after the type has been completed.
3007 * pt.c (tsubst_default_argument): Clear current_function_decl.
3009 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3011 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3013 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3015 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3016 is null, just print the literal name and return.
3018 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3020 * cxx-pretty-print.c: Fix comment typos.
3022 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3024 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3027 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3029 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3030 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3033 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3035 PR 12267, 12391, 12560, 13129, 14114, 14133
3036 * cp-lang.c (c_reset_state): Delete.
3037 (push_file_scope, pop_file_scope): New stubs.
3038 * parser.c (c_parse_file): Call sorry() here if called more than once.
3040 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3042 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3045 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3047 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3049 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3051 * error.c (enum pad): Remove.
3052 (dump_qualifiers): Likewise.
3053 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3054 (dump_aggr_type): Likewise.
3055 (dump_type_suffix): Likewise.
3056 (dump_simple_decl): Likewise.
3057 (dump_function_decl): Likewise.
3058 (cv_to_string): Likewise.
3059 (dump_type_prefix): Likewise. Adjust return void.
3060 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3062 (pp_cxx_template_keyword_if_needed): Document.
3063 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3064 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3065 MUST_NOT_THROW_EXPR.
3067 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3070 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3071 templates, if their type is non-dependent.
3073 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3075 * call.c (build_op_delete_call): Do not forget the placement
3076 arguments when iterating through mutiple delete operators.
3078 * cp-tree.h (svaed_scope): Remove last_parms.
3079 (NEW_DELETE_OPNAME_P): New macro.
3080 (last_function_parms): Remove.
3081 (do_friend): Adjust prototype.
3082 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3083 using last_function_parms.
3084 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3085 using last_function_parms.
3086 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3087 for class-specific operator new and operator delete.
3088 (grok_op_properties): Do not look for allocation functions with
3090 (start_function): Use DECL_ARGUMENTS instead of
3091 last_function_parms.
3092 * decl.h (last_function_parms): Do not declare.
3093 * decl2.c (grokclassfn): Do not use last_function_parms.
3094 * friend.c (do_friend): Remove parmdecls parameter.
3095 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3096 (pop_from_top_level): Do not restore it.
3097 * pt.c (check_explicit_specialization): Do not adjust
3098 last_function_parms.
3100 * name-lookup.c (do_local_using_decl): Create a local binding for
3101 types brought in via using declarations.
3103 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3104 function declarations correctly.
3106 * semantics.c (finish_id_expression): Correct handling of
3107 conversion operators to dependent types.
3109 * typeck.c (lookup_destructor): Allow the use of destructors from
3112 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3114 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3115 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3116 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3117 the field is named TEMPLATE_TYPE_PARM_INDEX.
3119 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3122 * parser.c (cp_parser_functional_cast): A cast to anything
3123 but integral or enumaration type is not an integral constant
3125 * pt.c (value_dependent_expression_p): Handle cast expressions
3126 without operands (such as "int()").
3128 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3130 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3131 cv-qualification between the type named by the
3132 pseudo-destructor-name and the object-type.
3134 * search.c (accessible_base_p): Handle non-proper bases.
3136 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3137 refers to a single overloaded function, set the type of the
3139 * tree.c (lvalue_type): Simplify.
3140 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3142 (build_unary_op): Handle OVERLOADs with known types.
3144 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3147 * parser.c (cp_parser_postfix_expression): Handle the use of
3148 "typename" in non-dependent contexts. Convert appropriately when
3149 when using a qualified name after "->" or ".".
3151 * call.c (conditional_conversion): Honor the requirement that some
3152 conversions refer to the original object.
3154 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3156 * call.c (build_conditional_expr): Do not call force_rvalue for
3157 operands of void_type when the conditional expression itself has
3159 * name-lookup.c (pushdecl): Don't consider a declaration of a
3160 function named "main" to be an overload of a type named "main".
3161 * parser.c (cp_parser_template_name): Perform name lookup when the
3162 template name is proceeded by "template" if the qualifying scope
3164 * typeck.c (composite_pointer_type_r): Correctly handle
3165 pointer-to-member types.
3166 (build_const_cast): Likewise.
3168 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3170 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3171 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3172 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3173 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3174 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3175 (TYPEOF_TYPE_EXPR): New macro.
3176 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3177 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3178 * pt.c (tsubst): Likewise.
3179 * semantics.c (finish_typeof): Likewise.
3180 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3181 and TEMPLATE_TYPE_PARM.
3182 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3183 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3185 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3188 * cp-tree.h (build_new_op): Change prototype.
3189 (build_x_binary_op): Likewise.
3190 * call.c (build_new_op): Add overloaded_p parameter.
3191 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3192 * parser.c (cp_parser_binary_expression): Note that uses of
3193 overloaded operators prevents an expression from being considered
3194 an integral constant.
3195 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3197 * semantics.c (finish_call_expr): Likewise.
3198 * typeck.c (rationalize_conditional_expr): Likewise.
3199 (build_x_indirect_ref): Likewise.
3200 (build_x_binary_op): Likewise.
3201 (build_x_unary_op): Likewise.
3202 (build_x_compound_expr): Likewise.
3203 (build_modify_expr): Likewise.
3204 * typeck2.c (build_x_arrow): Likewise.
3206 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3208 * cp-lang.c, ptree.c: Update copyright.
3210 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3213 * parser.c (cp_parser_non_integral_constant_expression): Encode
3214 more of the idiom that surrounded calls to this function within
3216 (cp_parser_primary_expression): Adjust accordingly.
3217 (cp_parser_postfix_expression): Likewise.
3218 (cp_parser_unary_expression): Likewise.
3219 (cp_parser_cast_expression): Likewise.
3220 (cp_parser_assignment_expression): Likewise.
3221 (cp_parser_expression): Likewise.
3222 (cp_parser_new_expression): Note that new-expressions are not
3223 allowed in integral constant expressions.
3224 (cp_parser_delete_expression): Likewise.
3226 2004-03-12 Matt Austern <austern@apple.com>
3228 * decl2.c (maybe_make_one_only): Look at
3229 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3230 to make an explicit instantiation weak.
3231 * method.c (use_thunk): Make sure we call comdat_linkage
3233 * pt.c (do_type_instantiation): On systems where weak symbols
3234 don't go in a static archive's TOC, explicit instantiation of a
3235 class must imply *explicit* instantiation of its memeber.
3237 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3239 * call.c, cp-tree.h, pt.c: Fix comment typos.
3241 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3244 * decl.c (xref_tag): Disregard non-type declarations when
3245 looking up a tagged type.
3247 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3250 * call.c (convert_like_real): Build a const qualified temporary,
3251 when testing ctor access.
3253 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3255 * call.c (initialize_reference): Fix typo.
3257 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3260 * pt.c (determine_specialization): For member templates, match also
3264 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3266 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3268 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3271 * call.c (initialize_reference): Handle initializers that are
3272 class-member access expressions applies to rvalues.
3274 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3277 * name-lookup.c (supplement_binding): Ignore functions that are
3278 marked DECL_ANTICIPATED.
3280 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3283 * class.c (check_field_decls): Complain about non-static data
3284 members of reference type in unions. Propagate
3285 CLASSTYPE_REF_FIELDS_NEED_INIT and
3286 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3288 * init.c (perform_member_init): Complain about mbmers with const
3289 type that are not explicitly initialized.
3291 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3293 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3294 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3295 (lang_identifier): Remove implicit_decl and error_locus.
3296 (IDENTIFIER_IMPLICIT_DECL): Remove.
3297 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3298 (IDENTIFIER_ERROR_LOCUS): Likewise.
3299 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3300 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3301 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3302 (implicitly_declare): Remove.
3303 * decl.c (warn_extern_redeclared_static): Remove check of
3304 IDENTIFIER_IMPLICIT_DECL.
3305 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3306 (implicitly_declare): Remove.
3307 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3308 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3309 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3310 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3311 in the innermost scope, rather than at namespace scope.
3312 * name-lookup.c (push_local_binding): Give it external linkage.
3313 (pushdecl): Remove dead code.
3314 * name-lookup.h (push_local_binding): Declare it.
3315 * ptree.c (cxx_print_identifier): Don't print
3316 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3317 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3318 not IDENTIFIER_ERROR_LOCUS.
3319 * typeck.c (build_function_call): Remove dead code.
3321 2004-03-08 Jason Merrill <jason@redhat.com>
3324 * decl.c (xref_tag): Remove attribute handling.
3325 * cp-tree.h: Adjust prototype.
3326 * decl.c, parser.c, rtti.c: Adjust callers.
3327 * parser.c (cp_parser_class_head): Pass back attributes in the
3329 (cp_parser_class_specifier): Adjust.
3331 2004-03-08 Matt Austern <austern@apple.com>
3334 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3335 as static, to static_decls array.
3337 2004-03-05 Jason Merrill <jason@redhat.com>
3339 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3341 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3343 * decl.c (grokfndecl): Update old incorrect comment.
3344 (grokvardecl): Diagnose C++ variables of type with no linkage.
3346 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3349 * pt.c (build_non_dependent_expr): Do not create a
3350 NON_DEPENDENT_EXPR for a THROW_EXPR.
3352 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3355 * error.c (dump_expr): Handle THROW_EXPR.
3357 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3360 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3361 lookup if ordinary name-lookup finds a non-function.
3362 * pt.c (tsubst_copy_and_build): Likewise.
3365 * parser.c (cp_parser_late_parsing_default_args): Check that there
3366 are no extra tokens after the end of the default-argument
3369 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3372 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3373 having C++ linkage for name-mangling purposes.
3376 * parser.c (cp_parser_direct_declarator): Recognize constructor
3377 declarators that use a template-id to name the class being
3381 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3382 (tsubst_expr): Do not call tsubst_copy, even when
3383 processing_template_decl.
3385 2004-03-01 Jeff Law <law@redhat.com>
3387 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3390 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3393 * name-lookup.h (push_scope): Change prototype.
3394 * name-lookup.c (push_scope): Do not reenter the current class
3396 * decl.c (grokfndecl): Check return code from push_scope before
3398 * decl2.c (check_classfn): Likewise.
3399 * parser.c (cp_parser_conversion_function_id): Likewise.
3400 (cp_parser_init_declarator): Likewise.
3401 (cp_parser_direct_declarator): Likewise.
3402 (cp_parser_class_specifier): Likewise.
3403 (cp_parser_class_head): Likewise.
3404 (cp_parser_lookup_name): Likewise.
3405 (cp_parser_constructor_declarator_p): Likewise.
3406 * pt.c (instantiate_class_template): Likewise.
3407 (resolve_typename_type): Likewise.
3409 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3412 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3416 * class.c (update_vtable_entry_for_fn): Do not go through
3417 covariance machinery if the type returned by an overrider is the
3418 same as the original.
3420 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3422 * call.c: Fix a comment typo.
3424 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3426 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3428 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3431 * parser.c (cp_parser_parameter_declaration_list): Commit
3432 to fewer tentative parses.
3434 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3437 * pt.c (dependent_type_p_r): A template template parameter is a
3440 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3443 * mangle.c (write_template_arg_literal): Don't rely on identity for
3446 2004-02-24 Jason Merrill <jason@redhat.com>
3448 * tree.c (build_exception_variant): Use check_qualified_type.
3450 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3451 Kazu Hirata <kazu@cs.umass.edu>
3453 * decl.c (cxx_init_decl_processing): Don't check
3454 flag_writable_strings.
3456 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3459 * typeck.c (maybe_warn_about_returning_address_of_location):
3460 Change check for VAR_DECL to use DECL_P instead.
3462 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3465 * cvt.c (build_expr_type_conversion): Type must be complete before
3466 looking up for conversions.
3468 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3471 * name-lookup.c (arg_assoc_class): Don't look into template
3472 arguments if it is not a primary template.
3474 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3477 * method.c (use_thunk): Always clone function argument tree.
3479 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3482 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3485 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3486 for all type variants.
3488 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3491 * decl.c (duplicate_decls): Return error_mark_node for invalid
3493 * name-lookup.c (push_namespace): Ignore the return value from
3495 * pt.c (push_template_decl_real): Robustify.
3498 * name-lookup.c (push_class_level_binding): Do not complain about
3499 adding a binding for a member whose name is the same as the
3500 enclosing class if the member is located in a base class of the
3503 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3506 * parser.c (cp_parser_new_expression): Parse an ill-formed
3507 direct-new-declarator after a parenthesized type-id to emit good
3510 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3512 * cp-tree.def, cvt.c: Update copyright.
3514 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3517 * cp-tree.h (abi_version_at_least): Remove.
3518 * mangle.c: Include flags.h.
3520 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3523 * call.c (build_conditional_expr): Handle conversions between
3524 class types which result in differently cv-qualified type
3528 * class.c (delete_duplicate_fields_1): Remove.
3529 (delete_duplicate_fields): Likewise.
3530 (finish_struct_anon): Remove check for members with the same name
3531 as their enclosing class.
3532 (check_field_decls): Do not call duplicate_fields.
3533 * decl.c (grokdeclarator): Remove check for static data members
3534 with the same name as their enclosing class.
3535 * name-lookup.c (push_class_level_binding): Check for members with
3536 the same name as their enclosing class.
3538 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3541 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3543 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3546 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3547 has full set of arguments.
3549 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3552 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3554 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3557 * cp-tree.h (delete_sanity): Change prototype.
3558 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3559 Remove dead code. Adjust code to warn about deleting an array.
3560 * typekc.c (decay_conversion): Use build_address and build_nop.
3563 * search.c (accessible_p): Do not check access in thunks.
3566 * call.c (build_conditional_expr): Call force_rvalue on the
3567 non-void operand in the case that one result is a throw-expression
3568 and the other is not.
3570 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3573 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3574 the type name and look ahead for ::~, and bail out early with a
3575 better error message if the parse is going to fail.
3577 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3579 * call.c (conversion_kind): New type.
3580 (conversion_rank): Likewise.
3581 (conversion): Likewise.
3582 (CONVERSION_RANK): New macro.
3583 (conversion_obstack): New variable.
3584 (obstack_initialized): Likewise.
3585 (z_candidate): Change type of convs and second_conv.
3586 (candidate_warning): New type.
3587 (IDENTITY_RANK): Remove.
3588 (EXACT_RANK): Likewise.
3589 (PROMO_RANK): Likewise.
3590 (STD_RANK): Likewise.
3591 (PBOOL_RANK): Likewise.
3592 (USER_RANK): Likewise.
3593 (ELLIPSIS_RANK): Likewise.
3594 (BAD_RANK): Likewise.
3595 (ICS_RANK): Likewise.
3596 (ICS_STD_RANK): Likewise.
3597 (ICS_USER_FLAG): Likewise.
3598 (ICS_ELLIPSIS_FLAG): Likewise.
3599 (ICS_THIS_FLAG): Likewise.
3600 (ICS_BAD_FLAG): Likewise.
3601 (NEED_TEMPORARY_P): Likewise.
3602 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3603 (USER_CONV_CAND): Likewise.
3604 (USER_CONV_FN): Likewise.
3605 (conversion_obstack_alloc): New function.
3606 (alloc_conversion): Likewise.
3607 (validate_conversion_obstack): Likewise.
3608 (alloc_conversions): Likewise.
3609 (build_conv): Adjust to deal with new conversion data structures.
3610 (build_identity_conv): New function.
3611 (build_ambiguous_conv): Likewise.
3612 (standard_conversion): Adjust to deal with new conversion data
3614 (convert_class_to_reference): Likewise.
3615 (direct_reference_binding): Likewise.
3616 (reference_binding): Likewise.
3617 (implicit_conversion): Likewise.
3618 (add_candidate): Likewise.
3619 (add_function_candidate): Likewise.
3620 (add_conv_candidate): Likewise.
3621 (build_builtin_candidate): Likewise.
3622 (print_z_candidate): Likewise.
3623 (merge_conversion_sequences): Likewise.
3624 (build_user_type_conversion_1): Likewise.
3625 (build_user_type_conversion): Likewise.
3626 (build_new_function_call): Likewise.
3627 (build_object_call): Likewise.
3628 (conditional_conversion): Likewise.
3629 (build_conditional_expr): Likewise.
3630 (build_new_op): Likewise.
3631 (build_op_delete_call): Likewise.
3632 (convert_like_real): Likewise.
3633 (build_over_call): Likewise.
3634 (build_new_method_call): Likewise.
3635 (is_subseq): Likewise.
3636 (maybe_handle_implicit_object): Likewise.
3637 (maybe_handle_ref_bind): Likewise.
3638 (compare_ics): Likewise.
3639 (source_type): Likewise.
3640 (add_warning): Likewise.
3642 (can_convert_arg): Likewise.
3643 (can_convert_arg_bad): Likewise.
3644 (perform_implicit_conversion): Likewise.
3645 (perform_direct_initialization_if_possible): Likewise.
3646 (initialize_reference): Likewise.
3647 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3648 * cp-tree.def (WRAPPER): Likewise.
3649 (IDENTITY_CONV): Remove.
3650 (LVALUE_CONV): Likewise.
3651 (QUAL_CONV): Likewise.
3652 (STD_CONV): Likewise.
3653 (PTR_CONV): Likewise.
3654 (PMEM_CONV): Likewise.
3655 (BASE_CONV): Likewise.
3656 (REF_BIND): Likewise.
3657 (USER_CONV): Likewise.
3658 (AMBIG_CONV): Likewise.
3659 (RVALUE_CONV): Likewise.
3660 * cp-tree.h (tree_wrapper): Remove.
3661 (WRAPPER_ZC): Remove.
3662 (lang_tree_node): Remove wrapper.
3663 (LOOKUP_SPECULATIVELY): Remove.
3664 (build_op_delete_call): Adjust prototype.
3665 (validate_conversion_obstack): Declare.
3666 (build_zc_wrapper): Remove.
3667 * cvt.c (convert_to_reference): Remove dead code.
3668 (ocp_convert): Likewise.
3669 * decl.c (redeclaration_error_message): Correct handling of
3671 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3672 (cp_tree_node_structure): Remove WRAPPER case.
3673 * decl2.c (finish_file): Call validate_conversion_obstack.
3674 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3675 (build_op_delete_call): Likewise.
3676 (build_x_delete): Likewise.
3677 (build_delete): Adjust call to build_op_delete_call.
3678 * pt.c (tsubst_friend_declaration): Adjust code to determine
3679 whether or not a friend template is a definition.
3680 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3681 * tree.c (build_zc_wrapper): Remove.
3683 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3685 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3686 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3687 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3688 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3690 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3692 * typeck.c (lookup_destructor): Fix typo in error message.
3694 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3696 * call.c, parser.c, tree.c: Fix comment typos.
3698 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3701 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3702 * decl.c (duplicate_decls, start_function): Likewise.
3704 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3706 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3707 * parser.c (free_parser_stacks): Delete.
3709 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3711 * rtti.c: Update copyright.
3713 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3716 * decl.c (require_complete_types_for_parms): Do not insert
3717 error_mark_node in the parameter list.
3719 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3722 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3723 error when terminator can not be found.
3725 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3727 Make-lang.in (po-generated): Delete.
3729 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3731 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3732 targetm.calls.promote_prototypes.
3734 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3738 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3740 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3741 (handle_pragma_implementation): Likewise.
3743 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3746 * typeck.c (lookup_destructor): Tweak error message.
3748 2004-02-05 Jan Hubicka <jh@suse.cz>
3750 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3753 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3756 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3757 code, only emits the diagnostic now. Added lookup of the identifier
3758 and support for qualified ids.
3759 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3760 Parse an (invalid) type name as id-expression within a declarator.
3761 (cp_parser_simple_declaration): Use it.
3762 (cp_parser_member_declaration): Likewise.
3763 (cp_parser_make_typename_type): New function. Handle errors through
3764 cp_parser_diagnose_invalid_typename.
3765 (cp_parser_elaborated_type_specifier): Use it.
3767 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3770 * call.c (convert_like_real): Use "converting" rather than
3771 "argument" as the descriptive keyword to
3772 dubious_conversion_warnings.
3773 * typeck.c (convert_for_assignment): Do not call
3774 dubious_conversion_warnings.
3776 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3779 * init.c (build_delete): Emit a more informative error message in
3780 case of an incomplete type, and on the correct source line.
3782 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3784 * error.c, search.c: Update copyright.
3786 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3789 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3790 linkage for the typeinfo name string.
3792 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3795 * cp-tree.h (fold_non_dependent_expr): New function.
3796 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3797 (cp_parser_template_argument): Use fold_non_dependent_expr.
3798 (cp_parser_direct_declarator): Likewise.
3799 * pt.c (fold_non_dependent_expr): New function.
3800 (convert_nontype_argument): Use it.
3801 (tsubst_qualified_id): Simplify.
3802 (tsubst_copy_and_build): Likewise.
3804 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3806 * decl.c (cxx_push_function_context): Do not set
3807 current_function_is_thunk.
3808 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3811 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3814 * pt.c (more_specialized_class): Increase processing_template_decl
3815 while partial ordering.
3817 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3820 * decl.c (start_function): Do not call pushdecl for any
3821 instantiation or specialization of a primary template.
3823 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3826 * parser.c (cp_parser_class_name): Robustify.
3829 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3832 * semantics.c (finish_id_expression): Do not return an
3833 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3835 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3838 * pt.c (build_non_dependent_expr): Do not build
3839 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3842 * semantics.c (finish_id_expression): Do not return an
3843 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3846 * parser.c (cp_parser_simple_declaration): When skipping to the
3847 end of the statement swallow the terminating semicolon.
3849 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3852 * init.c (build_offset_ref): Improve error recovery for invalid
3853 uses of non-static member functions.
3856 * cp-tree.h (cp_build_type_attribute_variant): New function.
3857 * class.c (build_clone): Use cp_build_type_attribute_variant.
3858 * decl.c (duplicate_decls): Likewise.
3859 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3860 (tsubst_function_type): Likewise.
3861 * tree.c (build_exception_variant): Check attributes before
3862 concluding that two types are the same.
3863 (cp_build_type-attribute_variant): New method.
3864 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3867 * call.c (convert_class_to_reference): Keep better track of
3868 pedantically invalid user-defined conversions.
3870 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3873 * pt.c (tsubst_qualified_id): Improved error message when a type
3874 is expected but not found.
3876 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3878 * class.c: Fix comment typos.
3880 * error.c: Likewise.
3881 * parser.c: Likewise.
3883 * search.c: Likewise.
3884 * typeck.c: Likewise.
3886 2004-01-30 Richard Henderson <rth@redhat.com>
3889 * method.c (use_thunk): Don't force_target_expr for void thunks.
3890 * tree.c (build_target_expr_with_type): Assert non-void type.
3891 (force_target_expr): Likewise.
3893 2004-01-30 Michael Matz <matz@suse.de>
3895 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3897 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3901 * decl.c (grokdeclarator): Check immediatly type completeness for
3902 non-dependent types.
3904 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3907 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3908 a sizeof expression.block
3910 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3913 * mangle.c (write_encoding): Correct encoding of member template
3916 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3918 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3919 template name as it was `<::' (digraph typo).
3920 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3921 (cp_parser_id_expression): Use it.
3922 (cp_parser_nested_name_specifier_opt): Likewise.
3923 (cp_parser_template_name): Likewise.
3924 (cp_parser_class_name): Likewise.
3925 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3927 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3930 * typeck.c (merge_types): Do not merge attributes into
3934 * parser.c (cp_parser_direct_declarator): Do not prevent
3935 backtracking inside a parenthesized declarator.
3936 (cp_parser_parameter_declaration): Fix typo in comment.
3938 2004-01-28 Jan Hubicka <jh@suse.cz>
3940 * semantics.c (expand_body) Do emit_associated_thunks before
3943 2004-01-27 Devang Patel <dpatel@apple.com>
3945 * name-lookup.c: Include "debug.h"
3946 (do_namespace_alias): Invoke debug_hooks to emit debug info
3947 for namespace alias.
3948 (do_local_using_decl): Invoke debug_hooks to emit debug info
3950 (do_class_using_decl): Same.
3951 (do_toplevel_using_decl): Same.
3952 (do_using_directive): Same.
3953 (cp_emit_debug_info_for_using): New function.
3954 * Make-lang.in (cp/parser.o): Depend on debug.h
3955 (cp/name-lookup.o): Same.
3957 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3959 * cp-tree.h (language_function, lang_type_header): Use
3961 * name-lookup.h (cp_binding_level): Likewise.
3963 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3966 * semantics.c (finish_for_expr): Check for unresolved overloaded
3969 * class.c (add_method): Just check processing_template_decl to
3970 determine whether or not we are within a template.
3971 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3972 * init.c (decl_constant_value): Check the type of the declaration,
3974 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3975 (push_to_top_level): ... this.
3976 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3977 * pt.c (push_template_decl_real): Reorder condition for speed.
3978 (convert_template_argument): Use dependency-checking functions in
3979 place of uses_template_parms.
3980 (lookup_template_class): Avoid calling uses_template_parms more
3982 (uses_template_parms): Reimplement, using dependency-checking
3984 (instantiate_class_template): Use push_to_top_level, not
3985 maybe_push_to_top_level.
3986 (type_unification_real): Simplify.
3987 (type_dependent_expression_p): Handle OFFSET_REFs and
3989 (any_dependent_template_arguments_p): Handle multiple levels of
3991 * semantics.c (expand_or_defer_fn): Do not check
3992 uses_template_parms for template instantiations.
3993 * typeck.c (comptypes): Avoid calling cp_type_quals.
3995 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3998 * call.c (build_over_call): Do not convert arguments when
3999 processing a template.
4000 * pt.c (build_non_dependent_expr): Do not build a
4001 NON_DEPENDENT_EXPR for arithmetic constants.
4003 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4006 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
4007 returns a TYPE_DECL. no further lookup is required.
4008 * semantics.c (check_template_template_default_arg): A TYPE_DECL
4009 is invalid. Rework to give better diagnostics.
4011 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4014 * pt.c (instantiate_class_template): Add an error_mark_node
4016 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4018 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4021 * decl.c (finish_function): Move the call to
4022 finish_fname_decls below the call to
4023 finish_eh_spec_block.
4025 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4027 * optimize.c, typeck2.c: Update copyright.
4029 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4031 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4032 init.c, mangle.c, typeck.c: Update copyright.
4034 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4036 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4038 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4040 * Make-lang.in: Replace $(docdir) with doc.
4041 (c++.info, c++.srcinfo): Dummy entry.
4042 (c++.man, c++.srcman): New rules.
4043 (c++.install-man): Revamp rule.
4045 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4047 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4048 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4049 immediate $(shell) instead of deferred backquote.
4051 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4054 * parser.c (cp_parser_postfix_expression): When encountering
4055 incomplete type on left-hand side of "->" or ".", treat the entire
4056 expression as erroneous.
4059 * call.c (build_field_call): Remove.
4060 (n_build_method_call): Likewise.
4061 (build_method_call): Likewise.
4062 (build_new_method_call): Do not call build_field_call.
4063 * class.c (n_build_method_call): Remove.
4064 (print_class_statistics): Do not print it.
4065 * cp-tree.h (build_method_call): Remove declaration.
4066 (finish_object_call_expr): Likewise.
4067 (build_new_1): Do not use build_method_call.
4068 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4069 when the function appearing on the right-hand-side of "." or "->"
4070 is not actually a function.
4071 * pt.c (tsubst_copy_and_build): Likewise.
4072 * semantics.c (finish_object_call_expr): Remove.
4074 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4077 * pt.c (tsubst): Use finish_typeof.
4079 2004-01-18 Jason Merrill <jason@redhat.com>
4082 * except.c (build_throw): In a template, set
4083 current_function_returns_abnormally.
4085 2004-01-17 Fred Fish <fnf@intrinsity.com>
4088 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4089 except don't call array_type_nelts() with a VECTOR_TYPE.
4091 2004-01-16 Jan Hubicka <jh@suse.cz>
4093 * mangle.c (write_mangled_name): Remove inline modifier.
4095 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4098 * decl.c (compute_array_index_type): Fix grammar in comment.
4099 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4102 * call.c (name_as_c_string): Print conversion operator names
4106 * call.c (initialize_reference): Pass -1 for inner parameter to
4109 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4112 * parser.c (cp_parser_base_specifier): Check for an invalid
4113 keyword `typename' and emit an user-friendly error message.
4115 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4118 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4119 (handle_pragma_implementation): Likewise.
4121 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4124 * typeck.c (build_class_member_access_expr): Allow to access members
4125 of the currently open class.
4126 (finish_class_member_access_expr): Likewise.
4128 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4131 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4132 name by value, instead of computing them.
4133 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4134 arguments. Pass them to validate_nonmember_using_decl.
4135 * name-lookup.h (do_local_using_decl): Adjust.
4136 (do_toplevel_using_decl): Likewise.
4137 * parser.c (cp_parser_using_declaration): Likewise.
4138 * pt.c (tsubst_expr): Likewise.
4140 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4144 * name-lookup.c (qualified_lookup_using_namespace): Search
4145 strongly-associated namespaces first, and only then try other
4148 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4150 * Make-lang.in (c++.srcextra): Dummy entry.
4152 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4155 * parser.c (cp_parser_template_name): Don't try to parse a
4156 conversion-function-id, as it cannot be a template-name.
4157 (cp_parser_simple_type_specifier): Check for invalid template-ids
4158 even after a built-in type.
4160 2004-01-14 Jan Hubicka <jh@suse.cz>
4163 * pt.c (instantiate_decl): Do not increase function_depth.
4165 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4169 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4170 attributes and discard.
4171 * decl.c (xref_tag): Don't overwite existing attributes with
4174 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4177 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4178 is no destructor while looking up a BIT_NOT_EXPR.
4180 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4182 * cxxfilt.c: Remove unused file.
4184 2004-01-14 Jan Hubicka <jh@suse.cz>
4186 Partial fix to PR c++/12850
4187 * decl2.c (mark_used): Do not proactively instantiate templates
4188 when compiling in unit-at-a-time or not optimizing.
4189 * optimize.c (maybe_clone_body): Do not increase function depth.
4191 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4194 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4196 2004-01-12 Steven Bosscher <stevenb@suse.de>
4199 * parser.c (cp_parser_member_declaration): Any non-type is also
4200 not a class or a function.
4202 2004-01-12 Jason Merrill <jason@redhat.com>
4205 * class.c (build_base_path): Do not mark vtable references as
4207 (build_vtbl_ref_1): Likewise.
4209 2004-01-12 Richard Henderson <rth@redhat.com>
4212 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4213 (store_init_value): Use it.
4214 * decl.c (check_initializer): Expect full initialization code
4215 from store_init_value.
4216 * init.c (expand_aggr_init_1): Likewise.
4217 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4219 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4221 * class.c (layout_class_type): For non-POD class types, also copy
4222 the DECL_SIZE and DECL_MODE of fields to the base class type.
4224 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4227 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4228 calling regenerate_decl_from_template.
4230 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4233 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4234 decl-specifier occurring along with a class definition.
4236 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4238 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4239 clauses to comments describing declares_class_or_enum.
4240 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4243 2004-01-12 Jan Hubicka <jh@suse.cz>
4245 * pt.c (for_each_template_parm): Do not check for duplicates.
4246 (for_each_template_parm): Use walk_tree duplicate checking code.
4248 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4251 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4252 is error_mark_node, don't add any more decl_specs.
4253 (cp_parser_init_declarator): After committing to a declaration, if
4254 the decl_specifiers start with error_mark_node, issue an error and
4255 change the type to "int".
4257 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4260 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4262 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4266 * pt.c (tsubst): Substitution must fail if we are attempting to
4267 create an array with element type that is an abstract class type.
4268 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4269 before calling abstract_virtuals_error.
4271 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4273 * name-lookup.c (qualified_lookup_using_namespace): Consider
4274 strong using directives even if we've already found a binding.
4276 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4278 * cp-tree.h (cxx_expand_expr): Change prototype.
4279 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4281 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4284 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4285 looking into them recursively. They can be there because of the
4286 new __offsetof__ extension.
4288 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4290 * parser.c (cp_parser_save_member_function_body): Mark the
4293 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4296 * class.c (build_clone): Copy type attributes from the original
4297 function to the clone.
4300 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4301 references as constant.
4304 * parser.c (cp_parser_explicit_instantiation): Improve error
4306 (cp_parser_require): Improve indication of the error location.
4309 * parser.c (cp_parser_class_head): Reorder logic to check for
4310 invalid qualification.
4312 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4315 * name-lookup.c (lookup_using_namespace): Remove spacesp
4317 (unqualified_namespace_lookup): Likewise.
4318 (lookup_qualified_name): Adjust accordingly.
4319 (lookup_name_real): Likewise.
4320 (lookup_arg_dependent): Do not eliminate the namespace of the
4321 functions found by unqualified name lookup unless that is the
4324 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4326 * semantics.c (push_deferring_access_checks): Fix format.
4327 (resume_deferring_access_checks): Likewise.
4328 (stop_deferring_access_checks): Likewise.
4329 (pop_deferring_access_checks): Likewise.
4330 (get_deferred_access_checks): Likewise.
4331 (pop_to_parent_deferring_access_checks): Likewise.
4332 (perform_deferred_access_checks): Likewise.
4333 (perform_or_defer_access_check): Likewise.
4335 2004-01-04 Richard Henderson <rth@redhat.com>
4337 * call.c (build_over_call): Don't create a save_expr of an
4338 aggregate, but rather its address.
4340 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4343 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4344 an offsetof expression.
4346 * parser.c (cp_parser_parameter_declaration): Fix comment.
4349 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4350 (reference_binding): Set it when appropriate.
4351 (build_temp): New function, split out from ...
4352 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4353 (initialize_reference): Likewise.
4356 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4357 (cp_parser_new): Initialize it.
4358 (cp_parser_postfix_expression): Set it.
4359 (cp_parser_sizeof_operand): Likewise.
4360 (cp_parser_parameteR_declaration): Do not commit early to tenative
4361 parsers when in_type_id_in_expr_p is set.
4363 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4366 * parser.c (cp_parser_template_argument): Don't call
4367 make_unbound_class_template directly.
4368 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4369 UNBOUND_CLASS_TEMPLATE tree node.
4371 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4374 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4376 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4379 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4380 (DECL_FUNCTION_TEMPLATE_P): Use it.
4381 (DECL_CLASS_TEMPLATE_P): Likewise.
4382 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4383 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4384 (cp_parser_template_name): Likewise.
4385 (cp_parser_elaborated_type_specifier): Likewise.
4386 (cp_parser_namespace_name): Likewise.
4387 (cp_parser_class_name): Likewise.
4388 (cp_parser_lookup_name_simple): Likewise.
4390 See ChangeLog.3 for earlier changes.