1 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
4 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
7 2010-07-01 Richard Guenther <rguenther@suse.de>
9 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
10 predicate we are looking for, allow non-gimplified
13 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
16 * typeck.c (cp_build_unary_op): Early return error_mark_node when
18 * call.c (convert_class_to_reference): Return error_mark_node when
21 2010-06-30 Michael Matz <matz@suse.de>
23 * repo.c (finish_repo): Fix typo.
25 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
27 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
29 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
31 * repo.c (pending_repo): Change type to a VEC.
32 (finish_repo): Adjust for new type of pending_repo.
33 (repo_emit_p): Likewise.
35 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
37 * tree.c: Include gimple.h. Do not include tree-flow.h
38 * decl.c: Do not include tree-flow.h
39 * Make-lang.in: Adjust dependencies.
41 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
43 * decl.c (incomplete_var): Declare. Declare VECs containing them.
44 (incomplete_vars): Adjust comment. Change type to a VEC.
45 (maybe_register_incomplete_var): Adjust for new type.
46 (complete_vars): Adjust iteration over incomplete_vars.
48 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
50 * decl.c (struct named_label_entry): Change type of bad_decls field
52 (poplevel_named_label_1): Adjust for new type of bad_decls.
53 (check_goto): Likewise.
55 2010-06-29 Jason Merrill <jason@redhat.com>
57 Enable implicitly declared move constructor/operator= (N3053).
58 * class.c (add_implicitly_declared_members): A class with no
59 explicitly declared copy or move constructor gets both declared
60 implicitly, and similarly for operator=.
61 (check_bases): A type with no copy ctor does not inhibit
62 a const copy ctor in a derived class. It does mean the derived
64 (check_field_decl): Likewise.
65 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
66 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
67 (trivially_copyable_p): Likewise.
68 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
69 * class.c (finish_struct_bits): Likewise.
70 * tree.c (build_target_expr_with_type): Likewise.
71 * typeck2.c (store_init_value): Likewise.
73 Enable implicitly deleted functions (N2346)
74 * class.c (check_bases_and_members): Adjust lambda flags.
75 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
77 * decl2.c (mark_used): Adjust error for use of deleted function.
79 Machinery to support implicit delete/move.
80 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
81 has_complex_move_ctor, has_complex_move_assign bitfields.
82 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
83 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
84 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
85 (enum special_function_kind): Add sfk_move_assignment.
86 (LOOKUP_SPECULATIVE): New.
87 * call.c (build_over_call): Return early if it's set.
88 (build_over_call): Use trivial_fn_p.
89 * class.c (check_bases): If the base has no default constructor,
90 the derived one is non-trivial. Handle move ctor/op=.
91 (check_field_decl): Likewise.
92 (check_bases_and_members): Handle move ctor/op=.
93 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
94 (type_has_move_constructor, type_has_move_assign): New.
95 * decl.c (grok_special_member_properties): Handle move ctor/op=.
96 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
98 (do_build_copy_constructor): Use it.
99 (do_build_assign_ref): Likewise. Handle move assignment.
100 (build_stub_type, build_stub_object, locate_fn_flags): New.
101 (locate_ctor): Use locate_fn_flags.
102 (locate_copy, locate_dtor): Remove.
103 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
104 (process_subob_fn, synthesized_method_walk): New.
105 (maybe_explain_implicit_delete): New.
106 (implicitly_declare_fn): Use synthesized_method_walk,
107 type_has_trivial_fn, and type_set_nontrivial_flag.
108 (defaulted_late_check): Set DECL_DELETED_FN.
109 (defaultable_fn_check): Handle sfk_move_assignment.
110 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
111 implicitly deleted move ctor/op=.
112 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
113 (lookup_fnfields_slot): New.
114 * semantics.c (omp_clause_info_fndecl): Remove.
115 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
116 get_copy_assign, trivial_fn_p.
117 (trait_expr_value): Adjust call to locate_ctor.
118 * tree.c (special_function_p): Handle sfk_move_assignment.
120 * class.c (type_has_virtual_destructor): New.
121 * cp-tree.h: Declare it.
122 * semantics.c (trait_expr_value): Use it.
124 * call.c (build_over_call): Only give warnings with tf_warning.
126 * name-lookup.c (pop_scope): Handle NULL_TREE.
128 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
129 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
130 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
131 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
132 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
133 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
134 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
135 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
136 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
137 (sfk_assignment_operator): Rename to sfk_copy_assignment.
138 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
139 * search.c, semantics.c, tree.c: Adjust.
141 * pt.c (dependent_scope_ref_p): Remove.
142 (value_dependent_expression_p): Don't call it.
143 (type_dependent_expression_p): Here either.
144 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
145 if the scope isn't dependent.
147 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
151 * pt.c (has_value_dependent_address): New.
152 (value_dependent_expression_p): Check it.
153 (convert_nontype_argument): Likewise. Call decay_conversion before
154 folding if we want a pointer.
155 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
156 scope is the current instantiation.
158 2010-06-28 Jakub Jelinek <jakub@redhat.com>
161 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
164 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
166 * init.c: Do not include except.h.
169 * cp-lang.c: Likewise.
171 * semantics.c: Likewise.
173 * except.c: Likewise.
174 (init_exception_processing): Do not set the removed
175 lang_protect_cleanup_actions here.
176 (cp_protect_cleanup_actions): Make non-static and remove prototype.
177 (doing_eh): New, moved from except.c but removed the do_warning flag.
178 (expand_start_catch_block): Update doing_eh call.
179 (expand_end_catch_block): Likewise.
180 (build_throw): Likewise.
181 * cp-tree.h: Prototype cp_protect_cleanup_actions.
182 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
183 cp_protect_cleanup_actions.
184 * Make-lang.in: Update dependencies.
186 2010-06-26 Jason Merrill <jason@redhat.com>
188 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
189 constructor called with a single argument that takes a reference
190 to the constructor's class.
191 (BAD_CONVERSION_RANK): New.
192 (compare_ics): Use it to compare bad ICSes.
194 2010-06-25 Joseph Myers <joseph@codesourcery.com>
196 * lang-specs.h: Remove +e handling.
198 2010-06-24 Andi Kleen <ak@linux.intel.com>
200 * parser.c: (cp_parser_question_colon_clause):
201 Switch to use cp_lexer_peek_token.
202 Call warn_for_omitted_condop. Call pedwarn for omitted
205 2010-06-22 Jakub Jelinek <jakub@redhat.com>
208 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
209 datum and mark_rvalue_use on component.
212 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
213 the CALL_EXPR has no arguments.
215 2010-06-21 Jason Merrill <jason@redhat.com>
217 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
219 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
222 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
224 * name-lookup.c (struct arg_lookup): Convert namespaces and
225 classes fields to VEC.
226 (arg_assoc_namespace): Adjust for new type of namespaces.
227 (arg_assoc_class): Adjust for new type of classes.
228 (lookup_arg_dependent): Use make_tree_vector and
230 * typeck2.c (build_x_arrow): Use vec_member.
232 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
235 * error.c (dump_decl): Better wording for anonymous namespace.
237 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
239 * class.c (build_vtbl_initializer): Adjust computation of new_position
240 and which entry to add padding for.
242 2010-06-16 Jason Merrill <jason@redhat.com>
244 * except.c (check_noexcept_r): Return the problematic function.
245 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
246 * pt.c (tsubst_copy_and_build): Pass it.
247 * parser.c (cp_parser_unary_expression): Likewise.
248 * cp-tree.h: Adjust prototype.
250 * method.c (defaulted_late_check): Give the defaulted method
251 the same exception specification as the implicit declaration.
253 2010-06-15 Jason Merrill <jason@redhat.com>
255 * class.c (add_implicitly_declared_members): Implicit assignment
256 operators can also be virtual overriders.
257 * method.c (lazily_declare_fn): Likewise.
259 * call.c (convert_like_real): Give "initializing argument of"
260 information for ambiguous conversion. Give source position
263 * call.c (print_z_candidates): Do print viable deleted candidates.
264 (joust): Don't choose a deleted function just because its worst
265 conversion is better than another candidate's worst.
267 * call.c (convert_like_real): Don't complain about
268 list-value-initialization from an explicit constructor.
270 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
271 DECL_SOURCE_LOCATION directly.
273 * class.c (type_has_user_provided_default_constructor): Use
276 * call.c (is_subseq): Handle ck_aggr, ck_list.
277 (compare_ics): Treat an aggregate or ambiguous conversion to the
278 same type as involving the same function.
280 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
282 * typeck.c (convert_for_assignment): Fix comment. Change message
283 format from %d to %qP.
284 (convert_for_initialization): Fix comment.
286 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
288 * cp-tree.h (expr_list_kind): New type.
289 (impl_conv_rhs): New type.
290 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
292 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
293 diagnostics for easy translation. Change caller.
294 (convert_for_initialization): Use impl_conv_rhs and change caller.
295 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
296 diagnostics for easy translation. Change caller.
297 * decl.c (bad_spec_place): New enum.
298 (bad_specifiers): Use it and emit the diagnostics for easy
299 translation. Change caller.
300 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
302 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
304 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
306 * decl2.c (cp_write_global_declarations): Adjust for new type of
308 * name-lookup.c (current_decl_namespace): Likewise.
309 (push_decl_namespace): Likewise.
310 (pop_decl_namespace): Likewise.
312 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
314 * call.c (build_java_interface_fn_ref): Call build_function_type_list
315 instead of build_function_type.
316 * decl.c (cxx_init_decl_processing): Likewise.
317 (declare_global_var): Likewise.
318 (get_atexit_node): Likewise.
319 (expand_static_init): Likewise.
320 * decl2.c (start_objects): Likewise.
321 (start_static_storage_duration_function): Likewise.
322 * except.c (init_exception_processing): Likewise.
323 (build_exc_ptr): Likewise.
324 (build_throw): Likewise.
325 * rtti.c (throw_bad_cast): Likewise.
326 (throw_bad_typeid): Likewise.
327 (build_dynamic_cast_1): Likewise.
329 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
331 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
332 (build_op_delete_call): Likewise.
333 (build_over_call): Likewise.
334 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
335 * pt.c (process_partial_specialization): Likewise.
336 (tsubst_template_args): Likewise.
337 * semantics.c (finish_asm_stmt): Likewise.
339 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
341 * decl.c (record_key_method_defined): New, broken out of ...
342 (finish_function): ... here. Call it.
343 (start_decl): Treat aliases as definitions.
345 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
347 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
349 * pt.c (maybe_process_partial_specialization): Likewise.
350 (register_specialization): Likewise.
351 (add_pending_template): Likewise.
352 (lookup_template_class): Likewise.
353 (push_tinst_level): Likewise.
355 * parser.c (cp_lexer_new_main): Likewise.
356 (cp_lexer_new_from_tokens): Likewise.
357 (cp_token_cache_new): Likewise.
358 (cp_parser_context_new): Likewise.
359 (cp_parser_new): Likewise.
360 (cp_parser_nested_name_specifier_opt): Likewise.
361 (cp_parser_template_id): Likewise.
363 * name-lookup.c (binding_entry_make): Likewise.
364 (binding_table_construct): Likewise.
365 (binding_table_new): Likewise.
366 (cxx_binding_make): Likewise.
367 (pushdecl_maybe_friend): Likewise.
368 (begin_scope): Likewise.
369 (push_to_top_level): Likewise.
371 * lex.c (init_reswords): Likewise.
372 (retrofit_lang_decl): Likewise.
373 (cxx_dup_lang_specific_decl): Likewise.
374 (copy_lang_type): Likewise.
375 (cxx_make_type): Likewise.
377 * decl.c (make_label_decl): Likewise.
378 (check_goto): Likewise.
379 (start_preparsed_function): Likewise.
380 (save_function_data): Likewise.
382 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
384 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
386 * class.c (finish_struct_1): Likewise.
388 * cp-tree.h (struct lang_type): Add variable_size GTY option.
389 (struct lang_decl): Likewise.
391 * parser.c (cp_parser_new): Update comment to not reference
394 2010-06-07 Jason Merrill <jason@redhat.com>
397 * error.c (dump_parameters): Mask out TFF_SCOPE.
398 (dump_simple_decl): Don't print the scope of a PARM_DECL.
399 (dump_scope): Remove no-op mask.
402 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
404 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
405 * init.c (build_offset_ref): Use it.
406 * pt.c (maybe_process_partial_specialization): Use it.
407 (instantiate_class_template): Use it.
408 * search.c (lookup_base): Use it.
410 2010-06-07 Jakub Jelinek <jakub@redhat.com>
413 * expr.c (mark_exp_read): Handle INDIRECT_REF.
414 * cvt.c (convert_to_void): Handle INDIRECT_REF like
418 * decl.c (initialize_local_var): If TREE_USED is set on the type,
419 set also DECL_READ_P on the decl.
421 2010-05-25 Dodji Seketeli <dodji@redhat.com>
424 * cp-tree.h (typedef_variant_p): Move this declaration to
426 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
427 * decl.c (grokdeclarator): Do not rename debug info of an
428 anonymous tagged type named by a typedef.
430 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
433 * class.c (check_field_decls): Move the call to
434 check_bitfield_decl before trying to set the
435 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
437 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
439 * typeck.c: Update include path for moved files.
442 * cp-gimplify.c: Likewise.
443 * cp-lang.c: Likewise.
445 * semantics.c: Likewise.
446 * cxx-pretty-print.h: Likewise.
448 * parser.c: Likewise.
449 * cp-objcp-common.c: Likewise.
450 * cp-tree.h: Likewise.
451 * name-lookup.c: Likewise.
453 * name-lookup.h: Likewise.
454 * config-lang.in: Update paths in gtfiles for files in c-family/.
455 * Make-lang.in: Likewise.
457 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
459 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
460 * typeck.c (build_ptrmemfunc): Likewise.
462 2010-06-04 Jason Merrill <jason@redhat.com>
464 * typeck2.c (merge_exception_specifiers): Adjust merging of
465 throw() and noexcept(true).
467 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
468 using an uninitialized variable.
470 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
471 (pp_cxx_expression): Likewise.
473 Implement noexcept-specification (15.4)
474 * parser.c (cp_parser_exception_specification_opt): Parse it.
475 Give -Wdeprecated warning about throw() specs.
476 * pt.c (tsubst_exception_specification): Handle it.
477 * error.c (dump_exception_spec): Handle it.
478 (dump_expr): Handle NOEXCEPT_EXPR.
479 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
480 * typeck.c (comp_except_specs): Handle compatibility rules.
481 Change exact parm to take an enum.
482 * typeck2.c (merge_exception_specifiers): Handle noexcept.
483 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
484 (type_throw_all_p, build_noexcept_spec): New fns.
485 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
486 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
487 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
488 (noexcept_true_spec, noexcept_false_spec): New macros.
489 * name-lookup.c (pushdecl_maybe_friend): Adjust.
490 * search.c (check_final_overrider): Adjust.
491 * decl.c (check_redeclaration_exception_specification): Adjust.
492 (use_eh_spec_block): Use type_throw_all_p.
493 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
494 Give operator new a noexcept-specification in C++0x mode.
495 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
496 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
498 Implement noexcept operator (5.3.7)
499 * cp-tree.def (NOEXCEPT_EXPR): New.
500 * except.c (check_noexcept_r, finish_noexcept_expr): New.
501 * cp-tree.h: Declare finish_noexcept_expr.
502 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
503 * pt.c (tsubst_copy_and_build): And tsubst it.
504 (type_dependent_expression_p): Handle it.
505 (value_dependent_expression_p): Handle it.
507 * call.c (build_conditional_expr): Never fold in unevaluated context.
508 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
509 * semantics.c (simplify_aggr_init_expr): Likewise.
510 * typeck.c (merge_types): Call merge_exception_specifiers.
511 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
512 DECL_ANTICIPATED for preferring new type.
514 2010-06-04 Joseph Myers <joseph@codesourcery.com>
516 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
519 2010-06-04 Jakub Jelinek <jakub@redhat.com>
522 * typeck.c (build_class_member_access_expr): Call mark_exp_read
523 on object for static data members.
525 2010-06-04 Jakub Jelinek <jakub@redhat.com>
526 Jason Merrill <jason@redhat.com>
529 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
530 with the same type, call mark_lvalue_use on both.
532 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
534 * class.c (struct vtbl_init_data_s): Remove last_init field.
535 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
537 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
539 (build_vtt): Likewise.
540 (initialize_vtable): Take a VEC instead of a tree.
541 (build_vtt_inits): Change return type to void. Take a VEC **
542 instead of a tree *; accumulate results into said VEC.
543 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
544 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
545 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
547 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
548 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
550 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
551 rather than tree_cons.
552 (build_vbase_offset_vtbl_entries): Likewise.
553 (add_vcall_offset): Likewise.
554 (build_rtti_vtbl_entries): Likewise.
555 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
556 * decl.c (initialize_artificial_var): Use build_constructor instead
557 of build_constructor_from_list.
559 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
562 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
565 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
567 * parser.c (cp_parser_mem_initializer_list): Change error text.
569 2010-06-02 Jakub Jelinek <jakub@redhat.com>
571 * cp-objcp-common.c (shadowed_var_for_decl): Change into
572 tree_decl_map hashtab from tree_map.
573 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
574 (init_shadowed_var_for_decl): Adjust initialization.
577 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
578 instead of calling mark_exp_read only when not an assignment.
581 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
582 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
583 Set DECL_VALUE_EXPR on var.
585 2010-06-02 Jason Merrill <jason@redhat.com>
587 * error.c (dump_type): Improve typedef handling.
592 * name-lookup.c (same_entity_p): New.
593 (ambiguous_decl): Multiple declarations of the same entity
596 2010-06-01 Jason Merrill <jason@redhat.com>
599 * call.c (add_list_candidates): Prefer the default constructor.
600 (build_aggr_conv): Treat missing initializers like { }.
601 * typeck2.c (process_init_constructor_record): Likewise.
602 * init.c (expand_default_init): Use digest_init for
603 direct aggregate initialization, too.
605 * call.c (add_list_candidates): Split out...
606 (build_user_type_conversion_1): ...from here.
607 (build_new_method_call): And here.
608 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
611 * call.c (build_list_conv): Set list-initialization flags properly.
613 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
615 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
617 2010-06-01 Arnaud Charlet <charlet@adacore.com>
618 Matthew Gingell <gingell@adacore.com>
620 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
621 * decl2.c: Include langhooks.h and c-ada-spec.h.
622 (cpp_check, collect_source_refs, collect_ada_namespace,
623 collect_all_refs): New functions.
624 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
625 * lang-specs.h: Ditto.
627 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
629 * cp-tree.h (cp_build_function_call_nary): Declare.
630 * typeck.c (cp_build_function_call_nary): Define.
631 * decl.c (register_dtor_fn): Use it instead of
632 cp_build_function_call.
633 (cxx_maybe_build_cleanup): Likewise.
634 * decl2.c (generate_ctor_or_dtor_function): Likewise.
635 * except.c (do_get_exception_ptr): Likewise.
636 (do_begin_catch): Likewise.
637 (do_allocate_exception): Likewise.
638 (do_free_exception): Likewise.
639 (build_throw): Likewise. Use cp_build_function_call_vec instead
640 of cp_build_function_call.
641 (do_end_catch): Likewise.
643 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
645 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
646 (struct cp_declarator): Move id_loc field up.
648 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
650 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
651 this file is included before c-common.h. Define GCC_DIAG_STYLE
652 before including diagnostic-core.h and toplev.h.
653 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
654 * pt.c: Include cp-tree.h before c-common.h.
656 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
658 * tree.c (c_register_addr_space): Add stub.
660 2010-05-28 Joseph Myers <joseph@codesourcery.com>
662 * g++spec.c (lang_specific_driver): Use fatal_error instead of
665 2010-05-28 Dodji Seketeli <dodji@redhat.com>
667 Revert fix of PR c++/44188
668 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
670 * tree.c (typedef_variant_p): Revert moving this definition to
672 * decl.c (grokdeclarator): Revert naming typedef handling.
674 2010-05-27 Joseph Myers <joseph@codesourcery.com>
676 * call.c: Include diagnostic-core.h instead of diagnostic.h.
677 * cp-lang.c: Don't include diagnostic.h
678 * name-lookup.c: Include diagnostic-core.h instead of
680 (cp_emit_debug_info_for_using): Use seen_error.
681 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
682 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
683 * pt.c (iterative_hash_template_arg): Use seen_error.
684 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
685 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
686 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
687 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
690 2010-05-25 Dodji Seketeli <dodji@redhat.com>
693 * cp-tree.h (typedef_variant_p): Move this declaration to
695 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
696 * decl.c (grokdeclarator): Do not rename debug info of an
697 anonymous tagged type named by a typedef.
699 2010-05-27 Jason Merrill <jason@redhat.com>
702 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
705 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
708 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
709 * class.c (layout_class_type): Likewise.
710 * decl.c (finish_enum): Likewise.
711 * mangle.c (write_builitin_type): Likewise.
713 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
715 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
717 * decl.c (grokdeclarator): Handle __int128.
718 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
719 (cp_parser_simple_type_specifier): Likewise.
720 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
721 * typeck.c (cp_common_type): Handle __int128.
722 * mangle.c (integer_type_codes): Add itk_int128 and
725 2010-05-26 Jason Merrill <jason@redhat.com>
728 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
731 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
733 * cp-lang.c: Do not include expr.h.
735 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
737 * decl.c: Do not include rtl.h
738 * semantics.c: Likewise.
740 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
742 * cp-tree.h: Do not include splay-tree.h.
743 (struct prtmem_cst): Remove unused field and false comment.
744 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
745 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
746 * init.c: Do not include rtl.h and expr.h.
747 * class.c: Do not include rtl.h. Include splay-tree.h.
748 (build_clone): Use plain NULL instead of NULL_RTX.
749 * decl.c: Do not include expr.h. Explain why rtl.h has to be
750 included. Include splay-tree.h.
751 * method.c: Do not include rtl.h and expr.h.
752 (use_thunk): Use plain NULL instead of NULL_RTX.
753 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
754 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
755 and target.h. Include splay-tree.h.
756 * expr.c: Do not include rtl.h and expr.h.
757 * pt.c: Do not include obstack.h and rtl.h.
758 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
759 (tsubst_decl): Likewise.
760 (instantiate_decl): Likewise.
761 * semantics.c: Do not include exprt.h and debug.h. Explain why
762 rtl.h has to be included.
763 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
764 * call.c: Do not include rtl.h and expr.h.
765 * search.c: Do not include obstack.h and rtl.h.
766 * friend.c: Do not include rtl.h and expr.h.
767 * Make-lang.in: Update dependencies.
769 2010-05-25 Jakub Jelinek <jakub@redhat.com>
772 * parser.c (non_integral_constant): Add NIC_NONE.
773 (required_token): Add RT_NONE.
774 (cp_parser_unary_expression): Initialize non_constant_p
776 (cp_parser_asm_definition): Initialize missing to RT_NONE.
777 (cp_parser_primary_expression, cp_parser_postfix_expression,
778 cp_parser_cast_expression, cp_parser_binary_expression,
779 cp_parser_functional_cast): Fix formatting.
781 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
784 * parser.c: Remove inclusion of dyn-string.h.
785 (non_integral_constant): New enum.
786 (name_lookup_error): New enum.
787 (required_token): New enum.
788 (cp_parser_required_error): New function.
789 (cp_parser_require): Change the type of variable token_desc to
790 required_token and use cp_parser_required_error.
791 (cp_parser_require_keyword): Likewise.
792 (cp_parser_error): Use gmsgid as parameter.
793 (cp_parser_name_lookup_error): Change the type of variable desired to
794 name_lookup_error and put the diagnostic in the full sentences. Change
796 (cp_parser_non_integral_constant_expression): Change the type of the
797 variable thing to non_integral_constant and put the diagnostics in
798 full sentences. Change caller.
800 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
803 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
805 2010-05-24 Joseph Myers <joseph@codesourcery.com>
807 * error.c (cp_diagnostic_starter): Update call to
808 diagnostic_build_prefix.
809 (cp_print_error_function,
810 print_instantiation_partial_context_line): Check show_column flag
813 2010-05-24 Jason Merrill <jason@redhat.com>
816 * decl.c (check_initializer): Don't wrap an init-list in a
818 * init.c (build_aggr_init): Don't assume copy-initialization if
819 init has CONSTRUCTOR_IS_DIRECT_INIT.
820 * call.c (build_new_method_call): Sanity check.
822 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
824 * rtti.c (tinfo_base_init): Use build_constructor instead of
825 build_constructor_from_list. Don't cons a tree node for
827 (generic_initializer): Use build_constructor_single instead of
828 build_constructor_from_list.
829 (ptr_initializer): Use build_constructor instead of
830 build_constructor_from_list
831 (ptm_initializer): Likewise.
832 (class_initializer): Likewise. Take varargs instead of TRAIL.
833 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
834 build_constructor instead of build_constructor_from_list.
836 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
838 * semantics.c: Include bitmap.h.
839 * Make-lang.in: Update dependencies.
841 2010-05-22 Jan Hubicka <jh@suse.cz>
843 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
845 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
847 2010-05-21 Joseph Myers <joseph@codesourcery.com>
849 * cxx-pretty-print.c: Correct merge error.
851 2010-05-21 Joseph Myers <joseph@codesourcery.com>
853 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
854 (cp_print_error_function): Use diagnostic_abstract_origin macro.
855 (cp_printer): Handle %K here using percent_K_format.
856 * cxx-pretty-print.c: Include tree-pretty-print.h.
857 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
860 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
862 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
863 Clean up redundant includes.
865 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
868 * decl.c (xref_basetypes): Return false in case of ill-formed
871 2010-05-19 Jason Merrill <jason@redhat.com>
873 * call.c (reference_binding): Use cp_build_qualified_type_real
874 and cp_type_quals consistently.
875 (add_function_candidate): Likewise.
876 (build_conditional_expr): Likewise.
877 (convert_like_real): Likewise.
878 (type_passed_as): Likewise.
879 * class.c (add_method): Likewise.
880 (same_signature_p): Likewise.
881 (layout_class_type): Likewise.
882 * decl.c (cxx_init_decl_processing): Likewise.
883 (cp_fname_init): Likewise.
884 (grokdeclarator): Likewise.
885 * decl2.c (cp_reconstruct_complex_type): Likewise.
886 * init.c (build_new_1): Likewise.
887 * method.c (do_build_copy_constructor): Likewise.
888 (implicitly_declare_fn): Likewise.
889 * pt.c (tsubst_aggr_type): Likewise.
891 * rtti.c (init_rtti_processing): Likewise.
892 (build_headof): Likewise.
893 (build_dynamic_cast_1): Likewise.
894 (tinfo_base_init): Likewise.
895 (emit_support_tinfos): Likewise.
896 * semantics.c (capture_decltype): Likewise.
897 * tree.c (cv_unqualified): Likewise.
898 * typeck.c (composite_pointer_type): Likewise.
899 (string_conv_p): Likewise.
901 * mangle.c (write_CV_qualifiers_for_type): Tweak.
903 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
904 * decl.c (start_decl): Likewise.
905 * semantics.c (finish_compound_literal): Likewise.
906 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
907 (cp_type_readonly): Remove.
908 * cp-tree.h: Remove declaration.
910 * typeck.c (merge_types): Preserve memfn quals.
912 * decl.c (grokdeclarator): Don't check quals on fn type.
913 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
914 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
917 * typeck.c (type_memfn_quals): New fn.
918 (apply_memfn_quals): New fn.
919 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
920 (cp_type_readonly): Use cp_type_quals.
921 * cp-tree.h: Add declarations.
922 * tree.c (cp_build_qualified_type_real): Don't set, but do
923 preserve, quals on FUNCTION_TYPE.
924 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
925 * decl.c (build_ptrmem_type): Likewise.
926 (grokdeclarator): Likewise.
927 (static_fn_type): Likewise.
928 * decl2.c (change_return_type): Likewise.
929 (cp_reconstruct_complex_type): Likewise.
930 * pt.c (tsubst_function_type): Likewise.
932 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
934 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
936 * tree.c (build_min_non_dep_call_vec): Update comment.
938 2010-05-17 Jason Merrill <jason@redhat.com>
940 * call.c (struct z_candidate): Add explicit_targs field.
941 (add_template_candidate_real): Set it.
942 (build_over_call): Use it to control init-list warning.
945 * call.c (build_over_call): Limit init-list deduction warning to
946 cases where the argument is actually an init-list.
949 * call.c (build_over_call): Don't do bitwise copy for move ctor.
951 2010-05-17 Dodji Seketeli <dodji@redhat.com>
952 Jason Merrill <jason@redhat.com>
955 * decl.c (compute_array_index_type): Call mark_rvalue_use.
957 2010-05-15 Jason Merrill <jason@redhat.com>
959 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
960 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
962 (finish_eh_spec_block): Adjust.
964 2010-05-15 Jakub Jelinek <jakub@redhat.com>
967 * pt.c (tsubst): Unshare template argument.
969 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
971 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
972 * Make-lang.in: Fix dependencies accordingly.
974 2010-05-14 Jason Merrill <jason@redhat.com>
977 * except.c (build_throw): Simplify, adjust for DR 475.
980 * except.c (dtor_nothrow): Return nonzero for type with
984 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
985 gimple_build_eh_must_not_throw.
987 2010-05-14 Martin Jambor <mjambor@suse.cz>
989 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
992 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
994 * call.c (build_new_method_call): Change warning text.
995 * typeck2.c (build_functional_cast): Change error text.
997 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1000 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1001 shadowing the outer parameter or variables by the declaration of
1002 nested function in nested structure or class. Warn the shadowing by
1003 the declaration of nested lambda expression.
1005 2010-05-13 Jason Merrill <jason@redhat.com>
1007 * typeck.c (cp_build_array_ref): Factor out from...
1008 (build_array_ref): ...here. Drop complain parm.
1009 (build_new_op): Adjust.
1010 * class.c (build_vtbl_ref_1): Adjust.
1011 * decl2.c (grok_array_decl): Adjust.
1012 * cp-tree.h: Adjust prototypes.
1014 2010-05-13 Jan Hubicka <jh@suse.cz>
1016 * decl.c (cp_finish_decl): Do not worry about used attribute.
1018 2010-05-12 Jason Merrill <jason@redhat.com>
1020 * typeck.c (build_array_ref): Take complain parm.
1021 * cp-tree.h: Add it to prototype.
1022 * call.c (build_new_op): Pass it.
1023 * class.c (build_vtbl_ref): Pass it.
1024 * decl2.c (grok_array_decl): Pass it.
1028 * cp-tree.def (NULLPTR_TYPE): Remove.
1029 * cp-tree.h (NULLPTR_TYPE_P): New.
1030 (SCALAR_TYPE_P): Use it.
1031 (nullptr_type_node): New.
1032 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1033 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1035 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1036 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1037 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1038 * mangle.c (write_type): Likewise.
1039 * name-lookup.c (arg_assoc_type): Likewise.
1040 * typeck.c (build_reinterpret_cast_1): Likewise.
1041 * rtti.c (typeinfo_in_lib_p): Likewise.
1042 (emit_support_tinfos): Remove local nullptr_type_node.
1044 * cp-tree.h (UNKNOWN_TYPE): Remove.
1045 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1046 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1047 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1048 * class.c (instantiate_type): Check unknown_type_node rather than
1050 * name-lookup.c (maybe_push_decl): Likewise.
1051 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1052 (get_typeid): Likewise.
1053 * semantics.c (finish_offsetof): Likewise.
1056 * call.c (add_template_candidate_real): If deduction fails, still
1057 add the template as a non-viable candidate.
1058 (equal_functions): Handle template candidates.
1059 (print_z_candidate): Likewise.
1060 (print_z_candidates): Likewise.
1061 (build_new_function_call): Likewise.
1063 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1064 * call.c (add_candidates): Enforce it.
1065 (build_new_method_call): Try non-list ctor if no viable list ctor.
1066 (build_user_type_conversion_1): Likewise.
1068 * call.c (add_candidates): Distinguish between type(x) and
1070 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1071 (build_new_method_call): Give better error for conversion op.
1073 * call.c (add_candidates): Add first_arg and return_type parms.
1074 Add special constructor/conversion op handling.
1075 (convert_class_to_reference): Use it.
1076 (build_user_type_conversion_1): Likewise.
1077 (build_op_call): Likewise.
1078 (build_new_method_call): Likewise.
1079 (build_new_op): Adjust.
1080 (perform_overload_resolution): Adjust.
1082 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1087 * pt.c (process_partial_specialization): Return error_mark_node
1088 in case of unused template parameters in partial specialization.
1090 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1093 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1094 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1095 look at its second operand.
1097 2010-05-10 Jason Merrill <jason@redhat.com>
1100 * semantics.c (baselink_for_fns): Revert earlier change.
1103 * typeck.c (cp_build_modify_expr): Complain about assignment to
1104 array from init list.
1106 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1109 * decl.c (check_initializer): strip array type before checking for
1110 uninitialized const or ref members.
1112 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1115 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1116 error count. Emit errors only if compain is true.
1117 (build_new_1): Do not return error_mark_node if
1118 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1119 errors. Delay the check for user-provided constructor.
1120 (perform_member_init): Adjust.
1121 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1124 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1125 Jason Merrill <jason@redhat.com>
1127 Add support for C++0x nullptr.
1128 * cp-tree.def: Add NULLPTR_TYPE.
1129 * cp-tree.h: Add nullptr_node.
1130 (cp_tree_index): Add CPTI_NULLPTR.
1131 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1132 * call.c (null_ptr_cst_p): Handle nullptr.
1133 (standard_conversion): Likewise.
1134 (convert_arg_to_ellipsis): Likewise.
1135 * mangle.c (write_type): Likewise.
1136 * name-lookup.c (arg_assoc_type): Likewise.
1137 * parser.c (cp_parser_primary_expression): Likewise.
1138 * typeck.c (cp_build_binary_op): Likewise.
1139 (build_reinterpret_cast_1): Likewise.
1140 * error.c (dump_type): Likewise.
1141 (dump_type_prefix, dump_type_suffix): Likewise.
1142 * decl.c (cxx_init_decl_processing): Likewise.
1143 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1144 * cvt.c (ocp_convert): Likewise.
1145 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1146 nullptr_t tinfo in libsupc++.
1148 2010-05-06 Jason Merrill <jason@redhat.com>
1150 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1152 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1153 Dodji Seketeli <dodji@redhat.com>
1156 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1158 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1159 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1160 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1161 (cp_build_unary_op): Call lvalue_use.
1162 * decl.c (unused_but_set_errorcount): New variable.
1163 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1164 (duplicate_decls): Merge DECL_READ_P flags.
1165 (start_cleanup_fn): Set DECL_READ_P flag.
1166 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1167 * tree.c (rvalue): Call rvalue_use.
1168 * pt.c (convert_nontype_argument): Likewise.
1169 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1170 finish_decltype_type): Likewise.
1171 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1172 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1173 or rvalue_use depending on the expr.
1174 * init.c (build_new, build_delete): Likewise.
1175 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1177 2010-05-05 Jason Merrill <jason@redhat.com>
1180 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1181 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1183 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1186 * pt.c (unify): Check each elt for error_mark_node.
1188 2010-05-04 Jason Merrill <jason@redhat.com>
1191 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1193 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1196 * call.c (build_new_method_call): Return error_mark_node if fns is
1199 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1202 * pt.c (most_specialized_class): Pretend we are processing
1203 a template decl during the call to coerce_template_parms.
1205 2010-05-03 Jason Merrill <jason@redhat.com>
1209 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1210 from the selected underlying type unless -fstrict-enums. Set
1211 ENUM_UNDERLYING_TYPE to have the restricted range.
1212 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
1213 * class.c (check_bitfield_decl): Likewise.
1215 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
1218 * init.c (build_new_1): Revert the accidental checkin in
1221 2010-04-30 Jason Merrill <jason@redhat.com>
1224 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
1225 (pp_cxx_type_specifier_seq): ...here.
1227 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1229 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
1230 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1232 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
1235 * typeck.c (warn_args_num): New function.
1236 (convert_arguments): Use warn_args_num to print the diagnostic
1239 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
1242 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1243 user-provided constructor while recursing.
1245 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
1248 * error.c (print_instantiation_partial_context_line): Handle
1249 recursive instantiation.
1250 (print_instantiation_partial_context): Likewise.
1252 2010-04-27 Jason Merrill <jason@redhat.com>
1254 * init.c (perform_member_init): Check CLASS_TYPE_P.
1256 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1259 * init.c (perform_member_init): check for uninitialized const or
1260 reference members, including array types.
1262 2010-04-24 Jason Merrill <jason@redhat.com>
1264 * tree.c (get_fns): Split out from get_first_fn.
1265 * cp-tree.h: Declare it.
1266 * search.c (shared_member_p): Use it.
1267 * semantics.c (finish_qualified_id_expr): Simplify.
1268 (finish_id_expression): Simplify.
1270 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1271 whenever object is NULL_TREE. Don't do 'this' capture here.
1272 (finish_qualified_id_expr): Pass NULL_TREE.
1273 (finish_id_expression): Likewise.
1274 (lambda_expr_this_capture): Likewise.
1276 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1277 rather than checking current_class_ref directly.
1278 (finish_call_expr): Likewise.
1281 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1282 * class.c (current_nonlambda_class_type): New fn.
1283 * semantics.c (nonlambda_method_basetype): New.
1284 * cp-tree.h: Declare them.
1285 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1287 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1290 * semantics.c (lambda_return_type): Complain about
1294 * tree.c (cv_unqualified): Handle error_mark_node.
1297 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1298 if we don't want errors.
1301 * class.c (convert_to_base): Add complain parameter. Pass
1302 ba_quiet to lookup_base if we don't want errors.
1303 (build_vfield_ref): Pass complain to convert_to_base.
1304 * call.c (convert_like_real): Likewise.
1305 (initialize_reference): Likewise.
1306 (perform_direct_initialization_if_possible): Pass complain to
1308 * cp-tree.h: Adjust.
1310 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1311 Jason Merrill <jason@redhat.com>
1314 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1316 (check_initializer): Call it for classes that need constructing, too.
1317 * class.c (in_class_defaulted_default_constructor): New.
1318 * cp-tree.h: Declare it.
1320 2010-04-20 Jason Merrill <jason@redhat.com>
1323 * init.c (constant_value_1): Treat error_mark_node as a constant
1324 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1325 * cvt.c (ocp_convert): Handle getting error_mark_node from
1326 integral_constant_value.
1327 * decl.c (compute_array_index_type): Likewise.
1329 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1333 * typeck.c (incompatible_dependent_types_p): If one of the
1334 compared types if not a typedef then honour their main variant
1337 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1339 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1341 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1344 * typeck.c (structural_comptypes): Test dependent typedefs
1345 incompatibility before testing for their main variant based
1348 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1350 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1351 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1353 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1355 * decl.c (cxx_init_decl_processing): Remove second argument in call to
1356 build_common_tree_nodes.
1358 2010-04-14 Jason Merrill <jason@redhat.com>
1361 * parser.c (cp_parser_parenthesized_expression_list): Change
1362 is_attribute_list parm to int to indicate whether or not to
1363 handle initial identifier specially.
1364 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1366 2010-04-13 Jason Merrill <jason@redhat.com>
1368 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1370 * parser.c (cp_parser_lambda_expression): Complain about lambda in
1371 unevaluated context.
1372 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1374 2010-04-12 Jason Merrill <jason@redhat.com>
1377 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1378 return value directly.
1380 * call.c (type_decays_to): Call cv_unqualified for non-class type.
1382 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
1385 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1386 * init.c (build_new_1): Check for uninitialized const members and
1387 uninitialized reference members, when using new without
1388 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1389 (diagnose_uninitialized_cst_or_ref_member): Define, call
1390 diagnose_uninitialized_cst_or_ref_member_1.
1391 (diagnose_uninitialized_cst_or_ref_member_1): New function.
1393 2010-04-12 Richard Guenther <rguenther@suse.de>
1396 * semantics.c (expand_or_defer_fn_1): Do not keep extern
1397 template inline functions.
1399 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1402 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1405 2010-04-07 Jason Merrill <jason@redhat.com>
1408 * decl.c (start_preparsed_function): Do defer nested functions.
1410 PR c++/11094, DR 408
1411 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1412 * decl2.c (finish_static_data_member_decl): Set it.
1413 * decl.c (duplicate_decls): Propagate it.
1414 * pt.c (tsubst_decl): Don't substitute the domain of an array
1415 VAR_DECL if it's set.
1416 (regenerate_decl_from_template): Substitute it here.
1417 (type_dependent_expression_p): Return true if it's set.
1418 * semantics.c (finish_decltype_type): Instantiate such a variable.
1419 * typeck.c (cxx_sizeof_expr): Likewise.
1420 (strip_array_domain): New.
1423 * name-lookup.c (current_decl_namespace): Non-static.
1424 (pop_nested_namespace): Sanity check.
1425 * cp-tree.h: Declare current_decl_namespace.
1426 * decl.c (grokvardecl): Use it instead of current_namespace.
1427 (grokfndecl): Likewise.
1430 * pt.c (tsubst_friend_function): Instatiate a friend that has already
1433 * pt.c (print_template_statistics): New.
1434 * cp-tree.h: Declare it.
1435 * tree.c (cxx_print_statistics): Call it.
1438 * decl.c (grokvardecl): Tweak warning message.
1439 (grokfndecl): Likewise.
1441 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1444 *pt.c (tsubst_decl): Get the arguments of a specialization from
1445 the specialization template, not from the most general template.
1447 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1450 * typeck2.c (process_init_constructor_record):
1451 value-initialize members that are are not explicitely
1454 2010-04-07 Jie Zhang <jie@codesourcery.com>
1457 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
1458 when all of its elements are non-constant and have been split out.
1460 2010-04-06 Taras Glek <taras@mozilla.com>
1461 Jason Merrill <jason@redhat.com>
1463 * parser.c (cp_parser_class_specifier): Set class location to that
1464 of IDENTIFIER_NODE instead of '{' when possible.
1465 * semantics.c (begin_class_definition): Do not overide locations
1466 with less precise ones.
1468 2010-04-06 Jason Merrill <jason@redhat.com>
1471 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
1474 * pt.c (maybe_update_decl_type): Check the return value from
1477 2010-04-01 Jason Merrill <jason@redhat.com>
1479 * decl.c (next_initializable_field): No longer static.
1480 * cp-tree.h: Declare it.
1481 * call.c (build_aggr_conv): Fail if there are more initializers
1482 than initializable fields.
1484 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
1485 instead of void_zero_node.
1487 2010-03-31 Dodji Seketeli <dodji@redhat.com>
1490 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
1491 * pt.c (end_template_parm_list): Store sibling template parms of
1492 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1493 (push_template_decl_real): Don't store the containing template decl
1494 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
1495 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
1496 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1499 2010-03-30 Jason Merrill <jason@redhat.com>
1502 * pt.c (push_template_decl_real): Deal better with running out of
1503 scopes before running out of template parms.
1507 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
1508 function parameter context. Don't print an error if parsing
1512 * pt.c (more_specialized_fn): Don't control cv-qualifier check
1515 2010-03-26 Jason Merrill <jason@redhat.com>
1518 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
1519 c++0x mode, but not other type-names.
1521 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1524 * pt.c (add_to_template_args): Support NULL ARGS;
1525 (most_specialized_class): call coerce_template_parms on
1526 template arguments passed to get_class_bindings. Use
1527 add_to_template_args.
1528 (unify): Handle VAR_DECLs.
1530 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1532 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
1534 * pt.c (get_template_parms_at_level): Adjust.
1536 2010-03-25 Dodji Seketeli <dodji@redhat.com>
1539 * cp-tree.h (get_template_parms_at_level): Declare ...
1540 * pt.c (get_template_parms_at_level): ... new function.
1541 * typeck.c (get_template_parms_of_dependent_type): If a template
1542 type parm's DECL_CONTEXT isn't yet set, get its siblings from
1543 current_template_parms. Use get_template_parms_at_level. Remove
1545 (incompatible_dependent_types_p): If we get empty parms from just one
1546 of the template type parms we are comparing then the template parms are
1549 2010-03-24 Jason Merrill <jason@redhat.com>
1552 * parser.c (make_declarator): Initialize id_loc.
1553 (cp_parser_lambda_declarator_opt): And set it.
1555 2010-03-23 Jason Merrill <jason@redhat.com>
1557 Make lambda conversion op and op() non-static.
1558 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
1559 Also add the thunk function returned by the conversion op.
1560 Mark the conversion deleted if the op() is variadic.
1561 * decl2.c (mark_used): Give helpful message about deleted conversion.
1562 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
1563 * semantics.c (finish_this_expr): Adjust.
1564 * mangle.c (write_closure_type_name): Adjust.
1565 * decl.c (grok_op_properties): Don't allow it.
1566 * call.c (build_user_type_conversion_1): No static conversion ops.
1567 (build_op_call): Or op().
1569 * decl2.c (change_return_type): Fix 'this' quals.
1571 2010-03-22 Jason Merrill <jason@redhat.com>
1574 * tree.c (pod_type_p): Use old meaning in C++98 mode.
1577 * pt.c (contains_auto_r): New fn.
1578 (do_auto_deduction): Use it.
1579 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
1581 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
1584 * decl2.c (grokfield): Handle invalid initializers for member
1587 2010-03-20 Dodji Seketeli <dodji@redhat.com>
1590 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
1592 * decl2.c (vague_linkage_p): Likewise.
1594 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1597 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
1598 false, in the cp_parser_expression_statement call.
1600 2010-03-05 Jason Merrill <jason@redhat.com>
1602 * mangle.c (mangle_decl): Give name collision error even without
1605 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
1607 * pt.c (process_partial_specialization): Use error_n instead of
1610 2010-03-03 Jason Merrill <jason@redhat.com>
1613 * mangle.c (mangle_decl): Handle VAR_DECL, too.
1615 2010-03-03 Jason Merrill <jason@redhat.com>
1618 * mangle.c: Include cgraph.h.
1619 (mangle_decl): If the mangled name will change in a later
1620 ABI version, make the later mangled name an alias.
1621 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
1622 * Make-lang.in (mangle.o): Depend on cgraph.h.
1623 * method.c (make_alias_for): Handle VAR_DECL, too.
1624 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
1625 * tree.c (no_linkage_check): Adjust.
1626 * decl.c (maybe_commonize_var): Adjust.
1627 * cp-tree.h: Adjust.
1629 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
1631 * pt.c (redeclare_class_template): Use error_n and inform_n.
1633 2010-02-27 Mark Mitchell <mark@codesourcery.com>
1636 * cp-tree.h (push_tinst_level): Declare.
1637 (pop_tinst_level): Likewise.
1638 * pt.c (push_tinst_level): Give it external linkage.
1639 (pop_tinst_level): Likewise.
1640 * mangle.c (mangle_decl_string): Set the source location to that
1641 of the decl while mangling.
1643 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
1646 * pt.c (redeclare_class_template): Return false if there are erroneous
1647 template parameters.
1649 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1651 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
1654 2010-02-24 Jason Merrill <jason@redhat.com>
1657 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
1659 * class.c (layout_class_type): Don't give -Wabi warning for a bug
1660 in a previous ABI version.
1662 2010-02-23 Jason Merrill <jason@redhat.com>
1665 * typeck2.c (digest_init_r): Accept value init of array.
1667 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1670 * typeck.c (convert_arguments): Update error message.
1672 2010-02-22 Mike Stump <mikestump@comcast.net>
1675 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
1677 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1680 * error.c (print_instantiation_partial_context_line): New.
1681 (print_instantiation_partial_context): Print at most 12 contexts,
1682 skip the rest with a message.
1684 2010-02-21 Dodji Seketeli <dodji@redhat.com>
1687 * pt.c (lookup_template_class): Better support of specialization
1688 of member of class template implicit instantiation.
1690 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1693 * call.c (conversion_null_warnings): Replace -Wconversion with
1695 * cvt.c (build_expr_type_conversion): Likewise.
1697 2010-02-18 Jason Merrill <jason@redhat.com>
1700 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
1703 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
1705 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
1706 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
1709 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
1713 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
1714 (maybe_update_decl_type): New fn.
1715 * parser.c (cp_parser_init_declarator): Use it.
1718 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
1720 2010-02-17 Jason Merrill <jason@redhat.com>
1723 * call.c (build_over_call): Don't create zero-sized assignments.
1724 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
1725 * cp-objcp-common.c (cp_expr_size): Remove.
1726 * cp-tree.h: Remove prototype.
1729 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
1730 decl we looked up doesn't match.
1733 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
1734 have an INIT_EXPR anymore.
1737 * pt.c (convert_nontype_argument): Change assert to test.
1739 2010-02-16 Jason Merrill <jason@redhat.com>
1741 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
1744 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
1745 VIEW_CONVERT_EXPR for conversions between structural equality types
1746 that the back end can't tell are the same.
1749 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
1750 cv-quals from element here.
1751 (cp_build_qualified_type_real): Not here. Preserve typedef name.
1753 2010-02-14 Jason Merrill <jason@redhat.com>
1756 * semantics.c (finish_compound_literal): Use
1757 cp_apply_type_quals_to_decl when creating a static variable.
1759 2010-02-12 Jason Merrill <jason@redhat.com>
1762 * name-lookup.h (current_binding_level): Check for null
1765 2010-02-12 Jason Merrill <jason@redhat.com>
1768 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
1770 2010-02-12 Jakub Jelinek <jakub@redhat.com>
1773 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
1776 2010-02-10 Jason Merrill <jason@redhat.com>
1779 * semantics.c (outer_lambda_capture_p): Revert.
1780 (add_capture): Only finish_member_declaration if
1781 we're in the lambda class.
1782 (register_capture_members): New.
1783 * cp-tree.h: Declare it.
1784 * parser.c (cp_parser_lambda_expression): Call it.
1786 2010-02-10 Jason Merrill <jason@redhat.com>
1789 * semantics.c (outer_lambda_capture_p): Use current_function_decl
1790 instead of current_class_type.
1792 2010-02-10 Jason Merrill <jason@redhat.com>
1794 PR c++/42983, core issue 906
1795 * method.c (defaultable_fn_check): Check virtualness.
1797 2010-02-10 Jason Merrill <jason@redhat.com>
1800 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
1802 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
1804 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
1805 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
1807 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
1808 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
1809 (cp_parser_parameter_declaration)
1810 (cp_parser_exception_specification_opt)
1811 (cp_parser_exception_declaration): Likewise.
1812 * pt.c (check_default_tmpl_args): Likewise.
1813 * search.c (lookup_field_r): Likewise.
1815 2010-02-09 Jason Merrill <jason@redhat.com>
1818 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
1820 2010-02-09 Jason Merrill <jason@redhat.com>
1823 * decl2.c (change_return_type): New fn.
1824 * semantics.c (apply_lambda_return_type): Use it.
1825 * cp-tree.h: Declare it.
1827 2010-02-05 Richard Guenther <rguenther@suse.de>
1829 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
1830 * cp-lang.c: Include gt-cp-cp-lang.h.
1831 * config-lang.in (gtfiles): Add cp/cp-lang.c.
1833 2010-02-05 Dodji Seketeli <dodji@redhat.com>
1836 * typeck.c (get_template_parms_of_dependent_type): Try getting
1837 the template parameters fromt the type itself first.
1839 2010-02-03 Jason Merrill <jason@redhat.com>
1843 * mangle.c (write_unqualified_id): Split out from write_expression.
1844 (write_unqualified_name): Call it.
1845 (write_member_name): Likewise.
1846 (write_expression): Support TEMPLATE_ID_EXPR.
1847 Disambiguate operator names.
1850 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
1853 2010-02-02 Jason Merrill <jason@redhat.com>
1856 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
1857 * optimize.c (clone_body): Remap their initializers when making base
1859 (maybe_clone_body): Complain if multiple clones aren't safe.
1861 2010-01-29 Dodji Seketeli <dodji@redhat.com>
1868 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1869 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1870 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
1871 * pt.c (coerce_template_parms, type_unification_real,
1872 expand_template_argument_pack, coerce_template_parameter_pack):
1873 Set the non default template args count.
1874 (current_template_args): Always set non defaulted
1875 template args count when compiled with --enable-checking
1876 (tsubst_template_args, type_unification_real): Propagate the non
1877 defaulted template args count.
1878 * error.c (get_non_default_template_args_count): Renamed
1879 count_non_default_template_args into this. Don't calculate the
1880 non default template argument count anymore. Use the new
1881 accessor macros above to get it.
1882 (dump_template_argument_list, dump_type, dump_decl,
1883 dump_template_parms): Adjust.
1884 * parser.c (cp_parser_template_argument_list): Always set defaulted
1885 template args count when compiled with --enable-checking.
1887 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
1889 * decl.c (redeclaration_error_message): Wrap the return messages into
1890 G_() for easy translation.
1892 2010-01-28 Jason Merrill <jason@redhat.com>
1895 * semantics.c (begin_class_definition): Don't use type_as_string.
1897 2010-01-28 Dodji Seketeli <dodji@redhat.com>
1901 * typeck.c (get_template_parms_of_dependent_type): Factorized
1902 this out of incompatible_template_type_parms_p
1903 (incompatible_dependent_types_p): Renamed
1904 incompatible_template_type_parms_p into this. Make it detect
1905 two incompatible dependent typedefs too.
1906 (structural_comptypes): Use incompatible_dependent_types_p.
1907 * pt.c (get_template_info):
1908 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
1910 2010-01-20 Janis Johnson <janis187@us.ibm.com>
1911 Jason Merrill <jason@redhat.com>
1913 * mangle.c (write_type): Mangle transparent record as member type.
1914 * semantics.c (begin_class_definition): Recognize decimal classes
1915 and set TYPE_TRANSPARENT_AGGR.
1917 2010-01-20 Jason Merrill <jason@redhat.com>
1920 * mangle.c (write_expression): Handle tree codes that have extra
1921 arguments in the middle-end.
1923 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
1926 * except.c (expand_start_catch_block): Deal correctly with
1927 do_begin_catch returning error_mark_node.
1929 2010-01-20 Jason Merrill <jason@redhat.com>
1932 * class.c (layout_class_type): Set packed_maybe_necessary for packed
1936 * semantics.c (build_lambda_object): Call mark_used on captured
1940 * decl.c (grokdeclarator): Clear type_quals for a member function
1941 declared using a typedef. Don't complain about adding cv-quals
1942 to a function typedef in C++0x mode.
1944 2010-01-20 Jakub Jelinek <jakub@redhat.com>
1946 * decl.c (create_array_type_for_decl): Remove set but not used
1947 variable error_msg. Remove break stmts after return stmts.
1949 2010-01-19 Dodji Seketeli <dodji@redhat.com>
1951 * error.c (dump_template_parms, count_non_default_template_args):
1952 Revert fix of PR c++/42634.
1954 2010-01-18 Dodji Seketeli <dodji@redhat.com>
1957 * error.c (dump_template_parms): Use innermost template
1958 arguments before calling count_non_default_template_args.
1959 (count_non_default_template_args): We are being called with
1960 template innermost arguments now. There is no need to ensure
1963 2010-01-18 Dodji Seketeli <dodji@redhat.com>
1966 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
1968 2010-01-17 Dodji Seketeli <dodji@redhat.com>
1971 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
1973 2010-01-17 Dodji Seketeli <dodji@redhat.com>
1976 *pt.c (tsubst_decl): Get the arguments of a specialization from
1977 the specialization template, not from the most general template.
1979 2010-01-16 Jason Merrill <jason@redhat.com>
1982 * semantics.c (finish_decltype_type): Within a template, treat
1983 unresolved CALL_EXPR as dependent.
1985 2010-01-15 Dodji Seketeli <dodji@redhat.com>
1987 * error.c (dump_template_parms,count_non_default_template_args):
1988 Revert changes of PR c++/42634.
1990 2010-01-14 Jakub Jelinek <jakub@redhat.com>
1993 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
1994 functions with noreturn attribute.
1996 2010-01-14 Jason Merrill <jason@redhat.com>
1999 * call.c (build_new_method_call): Don't free the vec here.
2002 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2004 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2007 * error.c (dump_template_parms): Use innermost template
2008 arguments before calling count_non_default_template_args.
2009 (count_non_default_template_args): We are being called with
2010 template innermost arguments now. There is no need to ensure
2013 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2016 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2017 arguments that were previously deduced.
2019 2010-01-05 Jason Merrill <jason@redhat.com>
2021 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2022 * call.c (build_over_call): Don't complain about it.
2024 2010-01-04 Jason Merrill <jason@redhat.com>
2027 * pt.c (tsubst_decl): Don't apply type attributes in place.
2030 * semantics.c (describable_type): Remove decltype comment and
2035 Copyright (C) 2010 Free Software Foundation, Inc.
2037 Copying and distribution of this file, with or without modification,
2038 are permitted in any medium without royalty provided the copyright
2039 notice and this notice are preserved.