1 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
3 * tree.c: Include gimple.h. Do not include tree-flow.h
4 * decl.c: Do not include tree-flow.h
5 * Make-lang.in: Adjust dependencies.
7 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
9 * decl.c (incomplete_var): Declare. Declare VECs containing them.
10 (incomplete_vars): Adjust comment. Change type to a VEC.
11 (maybe_register_incomplete_var): Adjust for new type.
12 (complete_vars): Adjust iteration over incomplete_vars.
14 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
16 * decl.c (struct named_label_entry): Change type of bad_decls field
18 (poplevel_named_label_1): Adjust for new type of bad_decls.
19 (check_goto): Likewise.
21 2010-06-29 Jason Merrill <jason@redhat.com>
23 Enable implicitly declared move constructor/operator= (N3053).
24 * class.c (add_implicitly_declared_members): A class with no
25 explicitly declared copy or move constructor gets both declared
26 implicitly, and similarly for operator=.
27 (check_bases): A type with no copy ctor does not inhibit
28 a const copy ctor in a derived class. It does mean the derived
30 (check_field_decl): Likewise.
31 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
32 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
33 (trivially_copyable_p): Likewise.
34 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
35 * class.c (finish_struct_bits): Likewise.
36 * tree.c (build_target_expr_with_type): Likewise.
37 * typeck2.c (store_init_value): Likewise.
39 Enable implicitly deleted functions (N2346)
40 * class.c (check_bases_and_members): Adjust lambda flags.
41 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
43 * decl2.c (mark_used): Adjust error for use of deleted function.
45 Machinery to support implicit delete/move.
46 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
47 has_complex_move_ctor, has_complex_move_assign bitfields.
48 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
49 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
50 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
51 (enum special_function_kind): Add sfk_move_assignment.
52 (LOOKUP_SPECULATIVE): New.
53 * call.c (build_over_call): Return early if it's set.
54 (build_over_call): Use trivial_fn_p.
55 * class.c (check_bases): If the base has no default constructor,
56 the derived one is non-trivial. Handle move ctor/op=.
57 (check_field_decl): Likewise.
58 (check_bases_and_members): Handle move ctor/op=.
59 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
60 (type_has_move_constructor, type_has_move_assign): New.
61 * decl.c (grok_special_member_properties): Handle move ctor/op=.
62 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
64 (do_build_copy_constructor): Use it.
65 (do_build_assign_ref): Likewise. Handle move assignment.
66 (build_stub_type, build_stub_object, locate_fn_flags): New.
67 (locate_ctor): Use locate_fn_flags.
68 (locate_copy, locate_dtor): Remove.
69 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
70 (process_subob_fn, synthesized_method_walk): New.
71 (maybe_explain_implicit_delete): New.
72 (implicitly_declare_fn): Use synthesized_method_walk,
73 type_has_trivial_fn, and type_set_nontrivial_flag.
74 (defaulted_late_check): Set DECL_DELETED_FN.
75 (defaultable_fn_check): Handle sfk_move_assignment.
76 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
77 implicitly deleted move ctor/op=.
78 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
79 (lookup_fnfields_slot): New.
80 * semantics.c (omp_clause_info_fndecl): Remove.
81 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
82 get_copy_assign, trivial_fn_p.
83 (trait_expr_value): Adjust call to locate_ctor.
84 * tree.c (special_function_p): Handle sfk_move_assignment.
86 * class.c (type_has_virtual_destructor): New.
87 * cp-tree.h: Declare it.
88 * semantics.c (trait_expr_value): Use it.
90 * call.c (build_over_call): Only give warnings with tf_warning.
92 * name-lookup.c (pop_scope): Handle NULL_TREE.
94 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
95 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
96 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
97 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
98 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
99 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
100 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
101 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
102 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
103 (sfk_assignment_operator): Rename to sfk_copy_assignment.
104 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
105 * search.c, semantics.c, tree.c: Adjust.
107 * pt.c (dependent_scope_ref_p): Remove.
108 (value_dependent_expression_p): Don't call it.
109 (type_dependent_expression_p): Here either.
110 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
111 if the scope isn't dependent.
113 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
117 * pt.c (has_value_dependent_address): New.
118 (value_dependent_expression_p): Check it.
119 (convert_nontype_argument): Likewise. Call decay_conversion before
120 folding if we want a pointer.
121 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
122 scope is the current instantiation.
124 2010-06-28 Jakub Jelinek <jakub@redhat.com>
127 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
130 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
132 * init.c: Do not include except.h.
135 * cp-lang.c: Likewise.
137 * semantics.c: Likewise.
139 * except.c: Likewise.
140 (init_exception_processing): Do not set the removed
141 lang_protect_cleanup_actions here.
142 (cp_protect_cleanup_actions): Make non-static and remove prototype.
143 (doing_eh): New, moved from except.c but removed the do_warning flag.
144 (expand_start_catch_block): Update doing_eh call.
145 (expand_end_catch_block): Likewise.
146 (build_throw): Likewise.
147 * cp-tree.h: Prototype cp_protect_cleanup_actions.
148 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
149 cp_protect_cleanup_actions.
150 * Make-lang.in: Update dependencies.
152 2010-06-26 Jason Merrill <jason@redhat.com>
154 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
155 constructor called with a single argument that takes a reference
156 to the constructor's class.
157 (BAD_CONVERSION_RANK): New.
158 (compare_ics): Use it to compare bad ICSes.
160 2010-06-25 Joseph Myers <joseph@codesourcery.com>
162 * lang-specs.h: Remove +e handling.
164 2010-06-24 Andi Kleen <ak@linux.intel.com>
166 * parser.c: (cp_parser_question_colon_clause):
167 Switch to use cp_lexer_peek_token.
168 Call warn_for_omitted_condop. Call pedwarn for omitted
171 2010-06-22 Jakub Jelinek <jakub@redhat.com>
174 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
175 datum and mark_rvalue_use on component.
178 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
179 the CALL_EXPR has no arguments.
181 2010-06-21 Jason Merrill <jason@redhat.com>
183 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
185 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
188 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
190 * name-lookup.c (struct arg_lookup): Convert namespaces and
191 classes fields to VEC.
192 (arg_assoc_namespace): Adjust for new type of namespaces.
193 (arg_assoc_class): Adjust for new type of classes.
194 (lookup_arg_dependent): Use make_tree_vector and
196 * typeck2.c (build_x_arrow): Use vec_member.
198 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
201 * error.c (dump_decl): Better wording for anonymous namespace.
203 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
205 * class.c (build_vtbl_initializer): Adjust computation of new_position
206 and which entry to add padding for.
208 2010-06-16 Jason Merrill <jason@redhat.com>
210 * except.c (check_noexcept_r): Return the problematic function.
211 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
212 * pt.c (tsubst_copy_and_build): Pass it.
213 * parser.c (cp_parser_unary_expression): Likewise.
214 * cp-tree.h: Adjust prototype.
216 * method.c (defaulted_late_check): Give the defaulted method
217 the same exception specification as the implicit declaration.
219 2010-06-15 Jason Merrill <jason@redhat.com>
221 * class.c (add_implicitly_declared_members): Implicit assignment
222 operators can also be virtual overriders.
223 * method.c (lazily_declare_fn): Likewise.
225 * call.c (convert_like_real): Give "initializing argument of"
226 information for ambiguous conversion. Give source position
229 * call.c (print_z_candidates): Do print viable deleted candidates.
230 (joust): Don't choose a deleted function just because its worst
231 conversion is better than another candidate's worst.
233 * call.c (convert_like_real): Don't complain about
234 list-value-initialization from an explicit constructor.
236 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
237 DECL_SOURCE_LOCATION directly.
239 * class.c (type_has_user_provided_default_constructor): Use
242 * call.c (is_subseq): Handle ck_aggr, ck_list.
243 (compare_ics): Treat an aggregate or ambiguous conversion to the
244 same type as involving the same function.
246 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
248 * typeck.c (convert_for_assignment): Fix comment. Change message
249 format from %d to %qP.
250 (convert_for_initialization): Fix comment.
252 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
254 * cp-tree.h (expr_list_kind): New type.
255 (impl_conv_rhs): New type.
256 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
258 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
259 diagnostics for easy translation. Change caller.
260 (convert_for_initialization): Use impl_conv_rhs and change caller.
261 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
262 diagnostics for easy translation. Change caller.
263 * decl.c (bad_spec_place): New enum.
264 (bad_specifiers): Use it and emit the diagnostics for easy
265 translation. Change caller.
266 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
268 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
270 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
272 * decl2.c (cp_write_global_declarations): Adjust for new type of
274 * name-lookup.c (current_decl_namespace): Likewise.
275 (push_decl_namespace): Likewise.
276 (pop_decl_namespace): Likewise.
278 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
280 * call.c (build_java_interface_fn_ref): Call build_function_type_list
281 instead of build_function_type.
282 * decl.c (cxx_init_decl_processing): Likewise.
283 (declare_global_var): Likewise.
284 (get_atexit_node): Likewise.
285 (expand_static_init): Likewise.
286 * decl2.c (start_objects): Likewise.
287 (start_static_storage_duration_function): Likewise.
288 * except.c (init_exception_processing): Likewise.
289 (build_exc_ptr): Likewise.
290 (build_throw): Likewise.
291 * rtti.c (throw_bad_cast): Likewise.
292 (throw_bad_typeid): Likewise.
293 (build_dynamic_cast_1): Likewise.
295 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
297 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
298 (build_op_delete_call): Likewise.
299 (build_over_call): Likewise.
300 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
301 * pt.c (process_partial_specialization): Likewise.
302 (tsubst_template_args): Likewise.
303 * semantics.c (finish_asm_stmt): Likewise.
305 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
307 * decl.c (record_key_method_defined): New, broken out of ...
308 (finish_function): ... here. Call it.
309 (start_decl): Treat aliases as definitions.
311 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
313 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
315 * pt.c (maybe_process_partial_specialization): Likewise.
316 (register_specialization): Likewise.
317 (add_pending_template): Likewise.
318 (lookup_template_class): Likewise.
319 (push_tinst_level): Likewise.
321 * parser.c (cp_lexer_new_main): Likewise.
322 (cp_lexer_new_from_tokens): Likewise.
323 (cp_token_cache_new): Likewise.
324 (cp_parser_context_new): Likewise.
325 (cp_parser_new): Likewise.
326 (cp_parser_nested_name_specifier_opt): Likewise.
327 (cp_parser_template_id): Likewise.
329 * name-lookup.c (binding_entry_make): Likewise.
330 (binding_table_construct): Likewise.
331 (binding_table_new): Likewise.
332 (cxx_binding_make): Likewise.
333 (pushdecl_maybe_friend): Likewise.
334 (begin_scope): Likewise.
335 (push_to_top_level): Likewise.
337 * lex.c (init_reswords): Likewise.
338 (retrofit_lang_decl): Likewise.
339 (cxx_dup_lang_specific_decl): Likewise.
340 (copy_lang_type): Likewise.
341 (cxx_make_type): Likewise.
343 * decl.c (make_label_decl): Likewise.
344 (check_goto): Likewise.
345 (start_preparsed_function): Likewise.
346 (save_function_data): Likewise.
348 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
350 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
352 * class.c (finish_struct_1): Likewise.
354 * cp-tree.h (struct lang_type): Add variable_size GTY option.
355 (struct lang_decl): Likewise.
357 * parser.c (cp_parser_new): Update comment to not reference
360 2010-06-07 Jason Merrill <jason@redhat.com>
363 * error.c (dump_parameters): Mask out TFF_SCOPE.
364 (dump_simple_decl): Don't print the scope of a PARM_DECL.
365 (dump_scope): Remove no-op mask.
368 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
370 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
371 * init.c (build_offset_ref): Use it.
372 * pt.c (maybe_process_partial_specialization): Use it.
373 (instantiate_class_template): Use it.
374 * search.c (lookup_base): Use it.
376 2010-06-07 Jakub Jelinek <jakub@redhat.com>
379 * expr.c (mark_exp_read): Handle INDIRECT_REF.
380 * cvt.c (convert_to_void): Handle INDIRECT_REF like
384 * decl.c (initialize_local_var): If TREE_USED is set on the type,
385 set also DECL_READ_P on the decl.
387 2010-05-25 Dodji Seketeli <dodji@redhat.com>
390 * cp-tree.h (typedef_variant_p): Move this declaration to
392 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
393 * decl.c (grokdeclarator): Do not rename debug info of an
394 anonymous tagged type named by a typedef.
396 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
399 * class.c (check_field_decls): Move the call to
400 check_bitfield_decl before trying to set the
401 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
403 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
405 * typeck.c: Update include path for moved files.
408 * cp-gimplify.c: Likewise.
409 * cp-lang.c: Likewise.
411 * semantics.c: Likewise.
412 * cxx-pretty-print.h: Likewise.
414 * parser.c: Likewise.
415 * cp-objcp-common.c: Likewise.
416 * cp-tree.h: Likewise.
417 * name-lookup.c: Likewise.
419 * name-lookup.h: Likewise.
420 * config-lang.in: Update paths in gtfiles for files in c-family/.
421 * Make-lang.in: Likewise.
423 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
425 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
426 * typeck.c (build_ptrmemfunc): Likewise.
428 2010-06-04 Jason Merrill <jason@redhat.com>
430 * typeck2.c (merge_exception_specifiers): Adjust merging of
431 throw() and noexcept(true).
433 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
434 using an uninitialized variable.
436 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
437 (pp_cxx_expression): Likewise.
439 Implement noexcept-specification (15.4)
440 * parser.c (cp_parser_exception_specification_opt): Parse it.
441 Give -Wdeprecated warning about throw() specs.
442 * pt.c (tsubst_exception_specification): Handle it.
443 * error.c (dump_exception_spec): Handle it.
444 (dump_expr): Handle NOEXCEPT_EXPR.
445 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
446 * typeck.c (comp_except_specs): Handle compatibility rules.
447 Change exact parm to take an enum.
448 * typeck2.c (merge_exception_specifiers): Handle noexcept.
449 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
450 (type_throw_all_p, build_noexcept_spec): New fns.
451 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
452 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
453 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
454 (noexcept_true_spec, noexcept_false_spec): New macros.
455 * name-lookup.c (pushdecl_maybe_friend): Adjust.
456 * search.c (check_final_overrider): Adjust.
457 * decl.c (check_redeclaration_exception_specification): Adjust.
458 (use_eh_spec_block): Use type_throw_all_p.
459 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
460 Give operator new a noexcept-specification in C++0x mode.
461 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
462 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
464 Implement noexcept operator (5.3.7)
465 * cp-tree.def (NOEXCEPT_EXPR): New.
466 * except.c (check_noexcept_r, finish_noexcept_expr): New.
467 * cp-tree.h: Declare finish_noexcept_expr.
468 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
469 * pt.c (tsubst_copy_and_build): And tsubst it.
470 (type_dependent_expression_p): Handle it.
471 (value_dependent_expression_p): Handle it.
473 * call.c (build_conditional_expr): Never fold in unevaluated context.
474 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
475 * semantics.c (simplify_aggr_init_expr): Likewise.
476 * typeck.c (merge_types): Call merge_exception_specifiers.
477 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
478 DECL_ANTICIPATED for preferring new type.
480 2010-06-04 Joseph Myers <joseph@codesourcery.com>
482 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
485 2010-06-04 Jakub Jelinek <jakub@redhat.com>
488 * typeck.c (build_class_member_access_expr): Call mark_exp_read
489 on object for static data members.
491 2010-06-04 Jakub Jelinek <jakub@redhat.com>
492 Jason Merrill <jason@redhat.com>
495 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
496 with the same type, call mark_lvalue_use on both.
498 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
500 * class.c (struct vtbl_init_data_s): Remove last_init field.
501 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
503 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
505 (build_vtt): Likewise.
506 (initialize_vtable): Take a VEC instead of a tree.
507 (build_vtt_inits): Change return type to void. Take a VEC **
508 instead of a tree *; accumulate results into said VEC.
509 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
510 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
511 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
513 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
514 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
516 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
517 rather than tree_cons.
518 (build_vbase_offset_vtbl_entries): Likewise.
519 (add_vcall_offset): Likewise.
520 (build_rtti_vtbl_entries): Likewise.
521 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
522 * decl.c (initialize_artificial_var): Use build_constructor instead
523 of build_constructor_from_list.
525 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
528 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
531 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
533 * parser.c (cp_parser_mem_initializer_list): Change error text.
535 2010-06-02 Jakub Jelinek <jakub@redhat.com>
537 * cp-objcp-common.c (shadowed_var_for_decl): Change into
538 tree_decl_map hashtab from tree_map.
539 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
540 (init_shadowed_var_for_decl): Adjust initialization.
543 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
544 instead of calling mark_exp_read only when not an assignment.
547 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
548 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
549 Set DECL_VALUE_EXPR on var.
551 2010-06-02 Jason Merrill <jason@redhat.com>
553 * error.c (dump_type): Improve typedef handling.
558 * name-lookup.c (same_entity_p): New.
559 (ambiguous_decl): Multiple declarations of the same entity
562 2010-06-01 Jason Merrill <jason@redhat.com>
565 * call.c (add_list_candidates): Prefer the default constructor.
566 (build_aggr_conv): Treat missing initializers like { }.
567 * typeck2.c (process_init_constructor_record): Likewise.
568 * init.c (expand_default_init): Use digest_init for
569 direct aggregate initialization, too.
571 * call.c (add_list_candidates): Split out...
572 (build_user_type_conversion_1): ...from here.
573 (build_new_method_call): And here.
574 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
577 * call.c (build_list_conv): Set list-initialization flags properly.
579 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
581 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
583 2010-06-01 Arnaud Charlet <charlet@adacore.com>
584 Matthew Gingell <gingell@adacore.com>
586 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
587 * decl2.c: Include langhooks.h and c-ada-spec.h.
588 (cpp_check, collect_source_refs, collect_ada_namespace,
589 collect_all_refs): New functions.
590 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
591 * lang-specs.h: Ditto.
593 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
595 * cp-tree.h (cp_build_function_call_nary): Declare.
596 * typeck.c (cp_build_function_call_nary): Define.
597 * decl.c (register_dtor_fn): Use it instead of
598 cp_build_function_call.
599 (cxx_maybe_build_cleanup): Likewise.
600 * decl2.c (generate_ctor_or_dtor_function): Likewise.
601 * except.c (do_get_exception_ptr): Likewise.
602 (do_begin_catch): Likewise.
603 (do_allocate_exception): Likewise.
604 (do_free_exception): Likewise.
605 (build_throw): Likewise. Use cp_build_function_call_vec instead
606 of cp_build_function_call.
607 (do_end_catch): Likewise.
609 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
611 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
612 (struct cp_declarator): Move id_loc field up.
614 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
616 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
617 this file is included before c-common.h. Define GCC_DIAG_STYLE
618 before including diagnostic-core.h and toplev.h.
619 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
620 * pt.c: Include cp-tree.h before c-common.h.
622 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
624 * tree.c (c_register_addr_space): Add stub.
626 2010-05-28 Joseph Myers <joseph@codesourcery.com>
628 * g++spec.c (lang_specific_driver): Use fatal_error instead of
631 2010-05-28 Dodji Seketeli <dodji@redhat.com>
633 Revert fix of PR c++/44188
634 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
636 * tree.c (typedef_variant_p): Revert moving this definition to
638 * decl.c (grokdeclarator): Revert naming typedef handling.
640 2010-05-27 Joseph Myers <joseph@codesourcery.com>
642 * call.c: Include diagnostic-core.h instead of diagnostic.h.
643 * cp-lang.c: Don't include diagnostic.h
644 * name-lookup.c: Include diagnostic-core.h instead of
646 (cp_emit_debug_info_for_using): Use seen_error.
647 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
648 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
649 * pt.c (iterative_hash_template_arg): Use seen_error.
650 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
651 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
652 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
653 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
656 2010-05-25 Dodji Seketeli <dodji@redhat.com>
659 * cp-tree.h (typedef_variant_p): Move this declaration to
661 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
662 * decl.c (grokdeclarator): Do not rename debug info of an
663 anonymous tagged type named by a typedef.
665 2010-05-27 Jason Merrill <jason@redhat.com>
668 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
671 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
674 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
675 * class.c (layout_class_type): Likewise.
676 * decl.c (finish_enum): Likewise.
677 * mangle.c (write_builitin_type): Likewise.
679 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
681 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
683 * decl.c (grokdeclarator): Handle __int128.
684 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
685 (cp_parser_simple_type_specifier): Likewise.
686 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
687 * typeck.c (cp_common_type): Handle __int128.
688 * mangle.c (integer_type_codes): Add itk_int128 and
691 2010-05-26 Jason Merrill <jason@redhat.com>
694 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
697 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
699 * cp-lang.c: Do not include expr.h.
701 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
703 * decl.c: Do not include rtl.h
704 * semantics.c: Likewise.
706 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
708 * cp-tree.h: Do not include splay-tree.h.
709 (struct prtmem_cst): Remove unused field and false comment.
710 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
711 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
712 * init.c: Do not include rtl.h and expr.h.
713 * class.c: Do not include rtl.h. Include splay-tree.h.
714 (build_clone): Use plain NULL instead of NULL_RTX.
715 * decl.c: Do not include expr.h. Explain why rtl.h has to be
716 included. Include splay-tree.h.
717 * method.c: Do not include rtl.h and expr.h.
718 (use_thunk): Use plain NULL instead of NULL_RTX.
719 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
720 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
721 and target.h. Include splay-tree.h.
722 * expr.c: Do not include rtl.h and expr.h.
723 * pt.c: Do not include obstack.h and rtl.h.
724 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
725 (tsubst_decl): Likewise.
726 (instantiate_decl): Likewise.
727 * semantics.c: Do not include exprt.h and debug.h. Explain why
728 rtl.h has to be included.
729 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
730 * call.c: Do not include rtl.h and expr.h.
731 * search.c: Do not include obstack.h and rtl.h.
732 * friend.c: Do not include rtl.h and expr.h.
733 * Make-lang.in: Update dependencies.
735 2010-05-25 Jakub Jelinek <jakub@redhat.com>
738 * parser.c (non_integral_constant): Add NIC_NONE.
739 (required_token): Add RT_NONE.
740 (cp_parser_unary_expression): Initialize non_constant_p
742 (cp_parser_asm_definition): Initialize missing to RT_NONE.
743 (cp_parser_primary_expression, cp_parser_postfix_expression,
744 cp_parser_cast_expression, cp_parser_binary_expression,
745 cp_parser_functional_cast): Fix formatting.
747 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
750 * parser.c: Remove inclusion of dyn-string.h.
751 (non_integral_constant): New enum.
752 (name_lookup_error): New enum.
753 (required_token): New enum.
754 (cp_parser_required_error): New function.
755 (cp_parser_require): Change the type of variable token_desc to
756 required_token and use cp_parser_required_error.
757 (cp_parser_require_keyword): Likewise.
758 (cp_parser_error): Use gmsgid as parameter.
759 (cp_parser_name_lookup_error): Change the type of variable desired to
760 name_lookup_error and put the diagnostic in the full sentences. Change
762 (cp_parser_non_integral_constant_expression): Change the type of the
763 variable thing to non_integral_constant and put the diagnostics in
764 full sentences. Change caller.
766 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
769 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
771 2010-05-24 Joseph Myers <joseph@codesourcery.com>
773 * error.c (cp_diagnostic_starter): Update call to
774 diagnostic_build_prefix.
775 (cp_print_error_function,
776 print_instantiation_partial_context_line): Check show_column flag
779 2010-05-24 Jason Merrill <jason@redhat.com>
782 * decl.c (check_initializer): Don't wrap an init-list in a
784 * init.c (build_aggr_init): Don't assume copy-initialization if
785 init has CONSTRUCTOR_IS_DIRECT_INIT.
786 * call.c (build_new_method_call): Sanity check.
788 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
790 * rtti.c (tinfo_base_init): Use build_constructor instead of
791 build_constructor_from_list. Don't cons a tree node for
793 (generic_initializer): Use build_constructor_single instead of
794 build_constructor_from_list.
795 (ptr_initializer): Use build_constructor instead of
796 build_constructor_from_list
797 (ptm_initializer): Likewise.
798 (class_initializer): Likewise. Take varargs instead of TRAIL.
799 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
800 build_constructor instead of build_constructor_from_list.
802 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
804 * semantics.c: Include bitmap.h.
805 * Make-lang.in: Update dependencies.
807 2010-05-22 Jan Hubicka <jh@suse.cz>
809 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
811 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
813 2010-05-21 Joseph Myers <joseph@codesourcery.com>
815 * cxx-pretty-print.c: Correct merge error.
817 2010-05-21 Joseph Myers <joseph@codesourcery.com>
819 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
820 (cp_print_error_function): Use diagnostic_abstract_origin macro.
821 (cp_printer): Handle %K here using percent_K_format.
822 * cxx-pretty-print.c: Include tree-pretty-print.h.
823 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
826 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
828 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
829 Clean up redundant includes.
831 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
834 * decl.c (xref_basetypes): Return false in case of ill-formed
837 2010-05-19 Jason Merrill <jason@redhat.com>
839 * call.c (reference_binding): Use cp_build_qualified_type_real
840 and cp_type_quals consistently.
841 (add_function_candidate): Likewise.
842 (build_conditional_expr): Likewise.
843 (convert_like_real): Likewise.
844 (type_passed_as): Likewise.
845 * class.c (add_method): Likewise.
846 (same_signature_p): Likewise.
847 (layout_class_type): Likewise.
848 * decl.c (cxx_init_decl_processing): Likewise.
849 (cp_fname_init): Likewise.
850 (grokdeclarator): Likewise.
851 * decl2.c (cp_reconstruct_complex_type): Likewise.
852 * init.c (build_new_1): Likewise.
853 * method.c (do_build_copy_constructor): Likewise.
854 (implicitly_declare_fn): Likewise.
855 * pt.c (tsubst_aggr_type): Likewise.
857 * rtti.c (init_rtti_processing): Likewise.
858 (build_headof): Likewise.
859 (build_dynamic_cast_1): Likewise.
860 (tinfo_base_init): Likewise.
861 (emit_support_tinfos): Likewise.
862 * semantics.c (capture_decltype): Likewise.
863 * tree.c (cv_unqualified): Likewise.
864 * typeck.c (composite_pointer_type): Likewise.
865 (string_conv_p): Likewise.
867 * mangle.c (write_CV_qualifiers_for_type): Tweak.
869 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
870 * decl.c (start_decl): Likewise.
871 * semantics.c (finish_compound_literal): Likewise.
872 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
873 (cp_type_readonly): Remove.
874 * cp-tree.h: Remove declaration.
876 * typeck.c (merge_types): Preserve memfn quals.
878 * decl.c (grokdeclarator): Don't check quals on fn type.
879 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
880 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
883 * typeck.c (type_memfn_quals): New fn.
884 (apply_memfn_quals): New fn.
885 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
886 (cp_type_readonly): Use cp_type_quals.
887 * cp-tree.h: Add declarations.
888 * tree.c (cp_build_qualified_type_real): Don't set, but do
889 preserve, quals on FUNCTION_TYPE.
890 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
891 * decl.c (build_ptrmem_type): Likewise.
892 (grokdeclarator): Likewise.
893 (static_fn_type): Likewise.
894 * decl2.c (change_return_type): Likewise.
895 (cp_reconstruct_complex_type): Likewise.
896 * pt.c (tsubst_function_type): Likewise.
898 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
900 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
902 * tree.c (build_min_non_dep_call_vec): Update comment.
904 2010-05-17 Jason Merrill <jason@redhat.com>
906 * call.c (struct z_candidate): Add explicit_targs field.
907 (add_template_candidate_real): Set it.
908 (build_over_call): Use it to control init-list warning.
911 * call.c (build_over_call): Limit init-list deduction warning to
912 cases where the argument is actually an init-list.
915 * call.c (build_over_call): Don't do bitwise copy for move ctor.
917 2010-05-17 Dodji Seketeli <dodji@redhat.com>
918 Jason Merrill <jason@redhat.com>
921 * decl.c (compute_array_index_type): Call mark_rvalue_use.
923 2010-05-15 Jason Merrill <jason@redhat.com>
925 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
926 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
928 (finish_eh_spec_block): Adjust.
930 2010-05-15 Jakub Jelinek <jakub@redhat.com>
933 * pt.c (tsubst): Unshare template argument.
935 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
937 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
938 * Make-lang.in: Fix dependencies accordingly.
940 2010-05-14 Jason Merrill <jason@redhat.com>
943 * except.c (build_throw): Simplify, adjust for DR 475.
946 * except.c (dtor_nothrow): Return nonzero for type with
950 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
951 gimple_build_eh_must_not_throw.
953 2010-05-14 Martin Jambor <mjambor@suse.cz>
955 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
958 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
960 * call.c (build_new_method_call): Change warning text.
961 * typeck2.c (build_functional_cast): Change error text.
963 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
966 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
967 shadowing the outer parameter or variables by the declaration of
968 nested function in nested structure or class. Warn the shadowing by
969 the declaration of nested lambda expression.
971 2010-05-13 Jason Merrill <jason@redhat.com>
973 * typeck.c (cp_build_array_ref): Factor out from...
974 (build_array_ref): ...here. Drop complain parm.
975 (build_new_op): Adjust.
976 * class.c (build_vtbl_ref_1): Adjust.
977 * decl2.c (grok_array_decl): Adjust.
978 * cp-tree.h: Adjust prototypes.
980 2010-05-13 Jan Hubicka <jh@suse.cz>
982 * decl.c (cp_finish_decl): Do not worry about used attribute.
984 2010-05-12 Jason Merrill <jason@redhat.com>
986 * typeck.c (build_array_ref): Take complain parm.
987 * cp-tree.h: Add it to prototype.
988 * call.c (build_new_op): Pass it.
989 * class.c (build_vtbl_ref): Pass it.
990 * decl2.c (grok_array_decl): Pass it.
994 * cp-tree.def (NULLPTR_TYPE): Remove.
995 * cp-tree.h (NULLPTR_TYPE_P): New.
996 (SCALAR_TYPE_P): Use it.
997 (nullptr_type_node): New.
998 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
999 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1001 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1002 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1003 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1004 * mangle.c (write_type): Likewise.
1005 * name-lookup.c (arg_assoc_type): Likewise.
1006 * typeck.c (build_reinterpret_cast_1): Likewise.
1007 * rtti.c (typeinfo_in_lib_p): Likewise.
1008 (emit_support_tinfos): Remove local nullptr_type_node.
1010 * cp-tree.h (UNKNOWN_TYPE): Remove.
1011 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1012 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1013 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1014 * class.c (instantiate_type): Check unknown_type_node rather than
1016 * name-lookup.c (maybe_push_decl): Likewise.
1017 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1018 (get_typeid): Likewise.
1019 * semantics.c (finish_offsetof): Likewise.
1022 * call.c (add_template_candidate_real): If deduction fails, still
1023 add the template as a non-viable candidate.
1024 (equal_functions): Handle template candidates.
1025 (print_z_candidate): Likewise.
1026 (print_z_candidates): Likewise.
1027 (build_new_function_call): Likewise.
1029 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1030 * call.c (add_candidates): Enforce it.
1031 (build_new_method_call): Try non-list ctor if no viable list ctor.
1032 (build_user_type_conversion_1): Likewise.
1034 * call.c (add_candidates): Distinguish between type(x) and
1036 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1037 (build_new_method_call): Give better error for conversion op.
1039 * call.c (add_candidates): Add first_arg and return_type parms.
1040 Add special constructor/conversion op handling.
1041 (convert_class_to_reference): Use it.
1042 (build_user_type_conversion_1): Likewise.
1043 (build_op_call): Likewise.
1044 (build_new_method_call): Likewise.
1045 (build_new_op): Adjust.
1046 (perform_overload_resolution): Adjust.
1048 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1053 * pt.c (process_partial_specialization): Return error_mark_node
1054 in case of unused template parameters in partial specialization.
1056 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1059 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1060 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1061 look at its second operand.
1063 2010-05-10 Jason Merrill <jason@redhat.com>
1066 * semantics.c (baselink_for_fns): Revert earlier change.
1069 * typeck.c (cp_build_modify_expr): Complain about assignment to
1070 array from init list.
1072 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1075 * decl.c (check_initializer): strip array type before checking for
1076 uninitialized const or ref members.
1078 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1081 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1082 error count. Emit errors only if compain is true.
1083 (build_new_1): Do not return error_mark_node if
1084 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1085 errors. Delay the check for user-provided constructor.
1086 (perform_member_init): Adjust.
1087 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1090 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1091 Jason Merrill <jason@redhat.com>
1093 Add support for C++0x nullptr.
1094 * cp-tree.def: Add NULLPTR_TYPE.
1095 * cp-tree.h: Add nullptr_node.
1096 (cp_tree_index): Add CPTI_NULLPTR.
1097 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1098 * call.c (null_ptr_cst_p): Handle nullptr.
1099 (standard_conversion): Likewise.
1100 (convert_arg_to_ellipsis): Likewise.
1101 * mangle.c (write_type): Likewise.
1102 * name-lookup.c (arg_assoc_type): Likewise.
1103 * parser.c (cp_parser_primary_expression): Likewise.
1104 * typeck.c (cp_build_binary_op): Likewise.
1105 (build_reinterpret_cast_1): Likewise.
1106 * error.c (dump_type): Likewise.
1107 (dump_type_prefix, dump_type_suffix): Likewise.
1108 * decl.c (cxx_init_decl_processing): Likewise.
1109 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1110 * cvt.c (ocp_convert): Likewise.
1111 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1112 nullptr_t tinfo in libsupc++.
1114 2010-05-06 Jason Merrill <jason@redhat.com>
1116 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1118 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1119 Dodji Seketeli <dodji@redhat.com>
1122 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1124 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1125 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1126 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1127 (cp_build_unary_op): Call lvalue_use.
1128 * decl.c (unused_but_set_errorcount): New variable.
1129 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1130 (duplicate_decls): Merge DECL_READ_P flags.
1131 (start_cleanup_fn): Set DECL_READ_P flag.
1132 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1133 * tree.c (rvalue): Call rvalue_use.
1134 * pt.c (convert_nontype_argument): Likewise.
1135 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1136 finish_decltype_type): Likewise.
1137 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1138 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1139 or rvalue_use depending on the expr.
1140 * init.c (build_new, build_delete): Likewise.
1141 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1143 2010-05-05 Jason Merrill <jason@redhat.com>
1146 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1147 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1149 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1152 * pt.c (unify): Check each elt for error_mark_node.
1154 2010-05-04 Jason Merrill <jason@redhat.com>
1157 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1159 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1162 * call.c (build_new_method_call): Return error_mark_node if fns is
1165 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1168 * pt.c (most_specialized_class): Pretend we are processing
1169 a template decl during the call to coerce_template_parms.
1171 2010-05-03 Jason Merrill <jason@redhat.com>
1175 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1176 from the selected underlying type unless -fstrict-enums. Set
1177 ENUM_UNDERLYING_TYPE to have the restricted range.
1178 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
1179 * class.c (check_bitfield_decl): Likewise.
1181 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
1184 * init.c (build_new_1): Revert the accidental checkin in
1187 2010-04-30 Jason Merrill <jason@redhat.com>
1190 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
1191 (pp_cxx_type_specifier_seq): ...here.
1193 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1195 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
1196 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1198 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
1201 * typeck.c (warn_args_num): New function.
1202 (convert_arguments): Use warn_args_num to print the diagnostic
1205 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
1208 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1209 user-provided constructor while recursing.
1211 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
1214 * error.c (print_instantiation_partial_context_line): Handle
1215 recursive instantiation.
1216 (print_instantiation_partial_context): Likewise.
1218 2010-04-27 Jason Merrill <jason@redhat.com>
1220 * init.c (perform_member_init): Check CLASS_TYPE_P.
1222 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1225 * init.c (perform_member_init): check for uninitialized const or
1226 reference members, including array types.
1228 2010-04-24 Jason Merrill <jason@redhat.com>
1230 * tree.c (get_fns): Split out from get_first_fn.
1231 * cp-tree.h: Declare it.
1232 * search.c (shared_member_p): Use it.
1233 * semantics.c (finish_qualified_id_expr): Simplify.
1234 (finish_id_expression): Simplify.
1236 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1237 whenever object is NULL_TREE. Don't do 'this' capture here.
1238 (finish_qualified_id_expr): Pass NULL_TREE.
1239 (finish_id_expression): Likewise.
1240 (lambda_expr_this_capture): Likewise.
1242 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1243 rather than checking current_class_ref directly.
1244 (finish_call_expr): Likewise.
1247 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1248 * class.c (current_nonlambda_class_type): New fn.
1249 * semantics.c (nonlambda_method_basetype): New.
1250 * cp-tree.h: Declare them.
1251 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1253 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1256 * semantics.c (lambda_return_type): Complain about
1260 * tree.c (cv_unqualified): Handle error_mark_node.
1263 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1264 if we don't want errors.
1267 * class.c (convert_to_base): Add complain parameter. Pass
1268 ba_quiet to lookup_base if we don't want errors.
1269 (build_vfield_ref): Pass complain to convert_to_base.
1270 * call.c (convert_like_real): Likewise.
1271 (initialize_reference): Likewise.
1272 (perform_direct_initialization_if_possible): Pass complain to
1274 * cp-tree.h: Adjust.
1276 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1277 Jason Merrill <jason@redhat.com>
1280 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1282 (check_initializer): Call it for classes that need constructing, too.
1283 * class.c (in_class_defaulted_default_constructor): New.
1284 * cp-tree.h: Declare it.
1286 2010-04-20 Jason Merrill <jason@redhat.com>
1289 * init.c (constant_value_1): Treat error_mark_node as a constant
1290 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1291 * cvt.c (ocp_convert): Handle getting error_mark_node from
1292 integral_constant_value.
1293 * decl.c (compute_array_index_type): Likewise.
1295 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1299 * typeck.c (incompatible_dependent_types_p): If one of the
1300 compared types if not a typedef then honour their main variant
1303 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1305 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1307 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1310 * typeck.c (structural_comptypes): Test dependent typedefs
1311 incompatibility before testing for their main variant based
1314 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1316 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1317 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1319 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1321 * decl.c (cxx_init_decl_processing): Remove second argument in call to
1322 build_common_tree_nodes.
1324 2010-04-14 Jason Merrill <jason@redhat.com>
1327 * parser.c (cp_parser_parenthesized_expression_list): Change
1328 is_attribute_list parm to int to indicate whether or not to
1329 handle initial identifier specially.
1330 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1332 2010-04-13 Jason Merrill <jason@redhat.com>
1334 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1336 * parser.c (cp_parser_lambda_expression): Complain about lambda in
1337 unevaluated context.
1338 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1340 2010-04-12 Jason Merrill <jason@redhat.com>
1343 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1344 return value directly.
1346 * call.c (type_decays_to): Call cv_unqualified for non-class type.
1348 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
1351 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1352 * init.c (build_new_1): Check for uninitialized const members and
1353 uninitialized reference members, when using new without
1354 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1355 (diagnose_uninitialized_cst_or_ref_member): Define, call
1356 diagnose_uninitialized_cst_or_ref_member_1.
1357 (diagnose_uninitialized_cst_or_ref_member_1): New function.
1359 2010-04-12 Richard Guenther <rguenther@suse.de>
1362 * semantics.c (expand_or_defer_fn_1): Do not keep extern
1363 template inline functions.
1365 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1368 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1371 2010-04-07 Jason Merrill <jason@redhat.com>
1374 * decl.c (start_preparsed_function): Do defer nested functions.
1376 PR c++/11094, DR 408
1377 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1378 * decl2.c (finish_static_data_member_decl): Set it.
1379 * decl.c (duplicate_decls): Propagate it.
1380 * pt.c (tsubst_decl): Don't substitute the domain of an array
1381 VAR_DECL if it's set.
1382 (regenerate_decl_from_template): Substitute it here.
1383 (type_dependent_expression_p): Return true if it's set.
1384 * semantics.c (finish_decltype_type): Instantiate such a variable.
1385 * typeck.c (cxx_sizeof_expr): Likewise.
1386 (strip_array_domain): New.
1389 * name-lookup.c (current_decl_namespace): Non-static.
1390 (pop_nested_namespace): Sanity check.
1391 * cp-tree.h: Declare current_decl_namespace.
1392 * decl.c (grokvardecl): Use it instead of current_namespace.
1393 (grokfndecl): Likewise.
1396 * pt.c (tsubst_friend_function): Instatiate a friend that has already
1399 * pt.c (print_template_statistics): New.
1400 * cp-tree.h: Declare it.
1401 * tree.c (cxx_print_statistics): Call it.
1404 * decl.c (grokvardecl): Tweak warning message.
1405 (grokfndecl): Likewise.
1407 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1410 *pt.c (tsubst_decl): Get the arguments of a specialization from
1411 the specialization template, not from the most general template.
1413 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1416 * typeck2.c (process_init_constructor_record):
1417 value-initialize members that are are not explicitely
1420 2010-04-07 Jie Zhang <jie@codesourcery.com>
1423 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
1424 when all of its elements are non-constant and have been split out.
1426 2010-04-06 Taras Glek <taras@mozilla.com>
1427 Jason Merrill <jason@redhat.com>
1429 * parser.c (cp_parser_class_specifier): Set class location to that
1430 of IDENTIFIER_NODE instead of '{' when possible.
1431 * semantics.c (begin_class_definition): Do not overide locations
1432 with less precise ones.
1434 2010-04-06 Jason Merrill <jason@redhat.com>
1437 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
1440 * pt.c (maybe_update_decl_type): Check the return value from
1443 2010-04-01 Jason Merrill <jason@redhat.com>
1445 * decl.c (next_initializable_field): No longer static.
1446 * cp-tree.h: Declare it.
1447 * call.c (build_aggr_conv): Fail if there are more initializers
1448 than initializable fields.
1450 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
1451 instead of void_zero_node.
1453 2010-03-31 Dodji Seketeli <dodji@redhat.com>
1456 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
1457 * pt.c (end_template_parm_list): Store sibling template parms of
1458 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1459 (push_template_decl_real): Don't store the containing template decl
1460 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
1461 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
1462 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1465 2010-03-30 Jason Merrill <jason@redhat.com>
1468 * pt.c (push_template_decl_real): Deal better with running out of
1469 scopes before running out of template parms.
1473 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
1474 function parameter context. Don't print an error if parsing
1478 * pt.c (more_specialized_fn): Don't control cv-qualifier check
1481 2010-03-26 Jason Merrill <jason@redhat.com>
1484 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
1485 c++0x mode, but not other type-names.
1487 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1490 * pt.c (add_to_template_args): Support NULL ARGS;
1491 (most_specialized_class): call coerce_template_parms on
1492 template arguments passed to get_class_bindings. Use
1493 add_to_template_args.
1494 (unify): Handle VAR_DECLs.
1496 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1498 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
1500 * pt.c (get_template_parms_at_level): Adjust.
1502 2010-03-25 Dodji Seketeli <dodji@redhat.com>
1505 * cp-tree.h (get_template_parms_at_level): Declare ...
1506 * pt.c (get_template_parms_at_level): ... new function.
1507 * typeck.c (get_template_parms_of_dependent_type): If a template
1508 type parm's DECL_CONTEXT isn't yet set, get its siblings from
1509 current_template_parms. Use get_template_parms_at_level. Remove
1511 (incompatible_dependent_types_p): If we get empty parms from just one
1512 of the template type parms we are comparing then the template parms are
1515 2010-03-24 Jason Merrill <jason@redhat.com>
1518 * parser.c (make_declarator): Initialize id_loc.
1519 (cp_parser_lambda_declarator_opt): And set it.
1521 2010-03-23 Jason Merrill <jason@redhat.com>
1523 Make lambda conversion op and op() non-static.
1524 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
1525 Also add the thunk function returned by the conversion op.
1526 Mark the conversion deleted if the op() is variadic.
1527 * decl2.c (mark_used): Give helpful message about deleted conversion.
1528 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
1529 * semantics.c (finish_this_expr): Adjust.
1530 * mangle.c (write_closure_type_name): Adjust.
1531 * decl.c (grok_op_properties): Don't allow it.
1532 * call.c (build_user_type_conversion_1): No static conversion ops.
1533 (build_op_call): Or op().
1535 * decl2.c (change_return_type): Fix 'this' quals.
1537 2010-03-22 Jason Merrill <jason@redhat.com>
1540 * tree.c (pod_type_p): Use old meaning in C++98 mode.
1543 * pt.c (contains_auto_r): New fn.
1544 (do_auto_deduction): Use it.
1545 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
1547 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
1550 * decl2.c (grokfield): Handle invalid initializers for member
1553 2010-03-20 Dodji Seketeli <dodji@redhat.com>
1556 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
1558 * decl2.c (vague_linkage_p): Likewise.
1560 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1563 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
1564 false, in the cp_parser_expression_statement call.
1566 2010-03-05 Jason Merrill <jason@redhat.com>
1568 * mangle.c (mangle_decl): Give name collision error even without
1571 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
1573 * pt.c (process_partial_specialization): Use error_n instead of
1576 2010-03-03 Jason Merrill <jason@redhat.com>
1579 * mangle.c (mangle_decl): Handle VAR_DECL, too.
1581 2010-03-03 Jason Merrill <jason@redhat.com>
1584 * mangle.c: Include cgraph.h.
1585 (mangle_decl): If the mangled name will change in a later
1586 ABI version, make the later mangled name an alias.
1587 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
1588 * Make-lang.in (mangle.o): Depend on cgraph.h.
1589 * method.c (make_alias_for): Handle VAR_DECL, too.
1590 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
1591 * tree.c (no_linkage_check): Adjust.
1592 * decl.c (maybe_commonize_var): Adjust.
1593 * cp-tree.h: Adjust.
1595 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
1597 * pt.c (redeclare_class_template): Use error_n and inform_n.
1599 2010-02-27 Mark Mitchell <mark@codesourcery.com>
1602 * cp-tree.h (push_tinst_level): Declare.
1603 (pop_tinst_level): Likewise.
1604 * pt.c (push_tinst_level): Give it external linkage.
1605 (pop_tinst_level): Likewise.
1606 * mangle.c (mangle_decl_string): Set the source location to that
1607 of the decl while mangling.
1609 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
1612 * pt.c (redeclare_class_template): Return false if there are erroneous
1613 template parameters.
1615 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1617 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
1620 2010-02-24 Jason Merrill <jason@redhat.com>
1623 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
1625 * class.c (layout_class_type): Don't give -Wabi warning for a bug
1626 in a previous ABI version.
1628 2010-02-23 Jason Merrill <jason@redhat.com>
1631 * typeck2.c (digest_init_r): Accept value init of array.
1633 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1636 * typeck.c (convert_arguments): Update error message.
1638 2010-02-22 Mike Stump <mikestump@comcast.net>
1641 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
1643 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1646 * error.c (print_instantiation_partial_context_line): New.
1647 (print_instantiation_partial_context): Print at most 12 contexts,
1648 skip the rest with a message.
1650 2010-02-21 Dodji Seketeli <dodji@redhat.com>
1653 * pt.c (lookup_template_class): Better support of specialization
1654 of member of class template implicit instantiation.
1656 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1659 * call.c (conversion_null_warnings): Replace -Wconversion with
1661 * cvt.c (build_expr_type_conversion): Likewise.
1663 2010-02-18 Jason Merrill <jason@redhat.com>
1666 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
1669 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
1671 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
1672 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
1675 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
1679 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
1680 (maybe_update_decl_type): New fn.
1681 * parser.c (cp_parser_init_declarator): Use it.
1684 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
1686 2010-02-17 Jason Merrill <jason@redhat.com>
1689 * call.c (build_over_call): Don't create zero-sized assignments.
1690 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
1691 * cp-objcp-common.c (cp_expr_size): Remove.
1692 * cp-tree.h: Remove prototype.
1695 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
1696 decl we looked up doesn't match.
1699 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
1700 have an INIT_EXPR anymore.
1703 * pt.c (convert_nontype_argument): Change assert to test.
1705 2010-02-16 Jason Merrill <jason@redhat.com>
1707 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
1710 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
1711 VIEW_CONVERT_EXPR for conversions between structural equality types
1712 that the back end can't tell are the same.
1715 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
1716 cv-quals from element here.
1717 (cp_build_qualified_type_real): Not here. Preserve typedef name.
1719 2010-02-14 Jason Merrill <jason@redhat.com>
1722 * semantics.c (finish_compound_literal): Use
1723 cp_apply_type_quals_to_decl when creating a static variable.
1725 2010-02-12 Jason Merrill <jason@redhat.com>
1728 * name-lookup.h (current_binding_level): Check for null
1731 2010-02-12 Jason Merrill <jason@redhat.com>
1734 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
1736 2010-02-12 Jakub Jelinek <jakub@redhat.com>
1739 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
1742 2010-02-10 Jason Merrill <jason@redhat.com>
1745 * semantics.c (outer_lambda_capture_p): Revert.
1746 (add_capture): Only finish_member_declaration if
1747 we're in the lambda class.
1748 (register_capture_members): New.
1749 * cp-tree.h: Declare it.
1750 * parser.c (cp_parser_lambda_expression): Call it.
1752 2010-02-10 Jason Merrill <jason@redhat.com>
1755 * semantics.c (outer_lambda_capture_p): Use current_function_decl
1756 instead of current_class_type.
1758 2010-02-10 Jason Merrill <jason@redhat.com>
1760 PR c++/42983, core issue 906
1761 * method.c (defaultable_fn_check): Check virtualness.
1763 2010-02-10 Jason Merrill <jason@redhat.com>
1766 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
1768 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
1770 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
1771 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
1773 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
1774 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
1775 (cp_parser_parameter_declaration)
1776 (cp_parser_exception_specification_opt)
1777 (cp_parser_exception_declaration): Likewise.
1778 * pt.c (check_default_tmpl_args): Likewise.
1779 * search.c (lookup_field_r): Likewise.
1781 2010-02-09 Jason Merrill <jason@redhat.com>
1784 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
1786 2010-02-09 Jason Merrill <jason@redhat.com>
1789 * decl2.c (change_return_type): New fn.
1790 * semantics.c (apply_lambda_return_type): Use it.
1791 * cp-tree.h: Declare it.
1793 2010-02-05 Richard Guenther <rguenther@suse.de>
1795 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
1796 * cp-lang.c: Include gt-cp-cp-lang.h.
1797 * config-lang.in (gtfiles): Add cp/cp-lang.c.
1799 2010-02-05 Dodji Seketeli <dodji@redhat.com>
1802 * typeck.c (get_template_parms_of_dependent_type): Try getting
1803 the template parameters fromt the type itself first.
1805 2010-02-03 Jason Merrill <jason@redhat.com>
1809 * mangle.c (write_unqualified_id): Split out from write_expression.
1810 (write_unqualified_name): Call it.
1811 (write_member_name): Likewise.
1812 (write_expression): Support TEMPLATE_ID_EXPR.
1813 Disambiguate operator names.
1816 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
1819 2010-02-02 Jason Merrill <jason@redhat.com>
1822 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
1823 * optimize.c (clone_body): Remap their initializers when making base
1825 (maybe_clone_body): Complain if multiple clones aren't safe.
1827 2010-01-29 Dodji Seketeli <dodji@redhat.com>
1834 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1835 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1836 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
1837 * pt.c (coerce_template_parms, type_unification_real,
1838 expand_template_argument_pack, coerce_template_parameter_pack):
1839 Set the non default template args count.
1840 (current_template_args): Always set non defaulted
1841 template args count when compiled with --enable-checking
1842 (tsubst_template_args, type_unification_real): Propagate the non
1843 defaulted template args count.
1844 * error.c (get_non_default_template_args_count): Renamed
1845 count_non_default_template_args into this. Don't calculate the
1846 non default template argument count anymore. Use the new
1847 accessor macros above to get it.
1848 (dump_template_argument_list, dump_type, dump_decl,
1849 dump_template_parms): Adjust.
1850 * parser.c (cp_parser_template_argument_list): Always set defaulted
1851 template args count when compiled with --enable-checking.
1853 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
1855 * decl.c (redeclaration_error_message): Wrap the return messages into
1856 G_() for easy translation.
1858 2010-01-28 Jason Merrill <jason@redhat.com>
1861 * semantics.c (begin_class_definition): Don't use type_as_string.
1863 2010-01-28 Dodji Seketeli <dodji@redhat.com>
1867 * typeck.c (get_template_parms_of_dependent_type): Factorized
1868 this out of incompatible_template_type_parms_p
1869 (incompatible_dependent_types_p): Renamed
1870 incompatible_template_type_parms_p into this. Make it detect
1871 two incompatible dependent typedefs too.
1872 (structural_comptypes): Use incompatible_dependent_types_p.
1873 * pt.c (get_template_info):
1874 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
1876 2010-01-20 Janis Johnson <janis187@us.ibm.com>
1877 Jason Merrill <jason@redhat.com>
1879 * mangle.c (write_type): Mangle transparent record as member type.
1880 * semantics.c (begin_class_definition): Recognize decimal classes
1881 and set TYPE_TRANSPARENT_AGGR.
1883 2010-01-20 Jason Merrill <jason@redhat.com>
1886 * mangle.c (write_expression): Handle tree codes that have extra
1887 arguments in the middle-end.
1889 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
1892 * except.c (expand_start_catch_block): Deal correctly with
1893 do_begin_catch returning error_mark_node.
1895 2010-01-20 Jason Merrill <jason@redhat.com>
1898 * class.c (layout_class_type): Set packed_maybe_necessary for packed
1902 * semantics.c (build_lambda_object): Call mark_used on captured
1906 * decl.c (grokdeclarator): Clear type_quals for a member function
1907 declared using a typedef. Don't complain about adding cv-quals
1908 to a function typedef in C++0x mode.
1910 2010-01-20 Jakub Jelinek <jakub@redhat.com>
1912 * decl.c (create_array_type_for_decl): Remove set but not used
1913 variable error_msg. Remove break stmts after return stmts.
1915 2010-01-19 Dodji Seketeli <dodji@redhat.com>
1917 * error.c (dump_template_parms, count_non_default_template_args):
1918 Revert fix of PR c++/42634.
1920 2010-01-18 Dodji Seketeli <dodji@redhat.com>
1923 * error.c (dump_template_parms): Use innermost template
1924 arguments before calling count_non_default_template_args.
1925 (count_non_default_template_args): We are being called with
1926 template innermost arguments now. There is no need to ensure
1929 2010-01-18 Dodji Seketeli <dodji@redhat.com>
1932 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
1934 2010-01-17 Dodji Seketeli <dodji@redhat.com>
1937 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
1939 2010-01-17 Dodji Seketeli <dodji@redhat.com>
1942 *pt.c (tsubst_decl): Get the arguments of a specialization from
1943 the specialization template, not from the most general template.
1945 2010-01-16 Jason Merrill <jason@redhat.com>
1948 * semantics.c (finish_decltype_type): Within a template, treat
1949 unresolved CALL_EXPR as dependent.
1951 2010-01-15 Dodji Seketeli <dodji@redhat.com>
1953 * error.c (dump_template_parms,count_non_default_template_args):
1954 Revert changes of PR c++/42634.
1956 2010-01-14 Jakub Jelinek <jakub@redhat.com>
1959 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
1960 functions with noreturn attribute.
1962 2010-01-14 Jason Merrill <jason@redhat.com>
1965 * call.c (build_new_method_call): Don't free the vec here.
1968 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
1970 2010-01-13 Dodji Seketeli <dodji@redhat.com>
1973 * error.c (dump_template_parms): Use innermost template
1974 arguments before calling count_non_default_template_args.
1975 (count_non_default_template_args): We are being called with
1976 template innermost arguments now. There is no need to ensure
1979 2010-01-07 Dodji Seketeli <dodji@redhat.com>
1982 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
1983 arguments that were previously deduced.
1985 2010-01-05 Jason Merrill <jason@redhat.com>
1987 * pt.c (unify_pack_expansion): Handle deduction from init-list.
1988 * call.c (build_over_call): Don't complain about it.
1990 2010-01-04 Jason Merrill <jason@redhat.com>
1993 * pt.c (tsubst_decl): Don't apply type attributes in place.
1996 * semantics.c (describable_type): Remove decltype comment and
2001 Copyright (C) 2010 Free Software Foundation, Inc.
2003 Copying and distribution of this file, with or without modification,
2004 are permitted in any medium without royalty provided the copyright
2005 notice and this notice are preserved.