1 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3 * cp-tree.h: Do not include toplev.h.
5 2010-07-06 Jason Merrill <jason@redhat.com>
8 * call.c (is_std_init_list): Look through typedefs.
11 * init.c (build_offset_ref): If scope isn't dependent,
12 don't exit early. Look at TYPE_MAIN_VARIANT.
13 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
15 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
17 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
19 * cp-tree.h (impl_conv_void): New type.
20 (convert_to_void): Adjust prototype.
21 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
22 diagnostic for easy translation. Change caller.
23 * typeck.c: Update call to convert_to_void.
24 * semantics.c: Likewise.
27 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
29 * decl.c (cp_finish_decl): Call add_local_decl.
30 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
32 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
34 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
37 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
40 * parser.c (cp_parser_primary_expression): Error if local template is
43 2010-07-02 Le-Chun Wu <lcwu@google.com>
46 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
47 (variable or type) shadows another type.
49 2010-07-02 Jakub Jelinek <jakub@redhat.com>
52 * typeck.c (convert_for_assignment): When converting a convertible
53 vector type or objc++ types, call mark_rvalue_use.
54 * typeck2.c (build_m_component_ref): Use return values from
55 mark_rvalue_use or mark_lvalue_use.
56 * class.c (build_base_path): Likewise.
57 * call.c (build_conditional_expr): Likewise.
59 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
62 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
65 2010-07-01 Richard Guenther <rguenther@suse.de>
67 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
68 predicate we are looking for, allow non-gimplified
71 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
74 * typeck.c (cp_build_unary_op): Early return error_mark_node when
76 * call.c (convert_class_to_reference): Return error_mark_node when
79 2010-06-30 Michael Matz <matz@suse.de>
81 * repo.c (finish_repo): Fix typo.
83 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
85 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
87 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
89 * repo.c (pending_repo): Change type to a VEC.
90 (finish_repo): Adjust for new type of pending_repo.
91 (repo_emit_p): Likewise.
93 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
95 * tree.c: Include gimple.h. Do not include tree-flow.h
96 * decl.c: Do not include tree-flow.h
97 * Make-lang.in: Adjust dependencies.
99 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
101 * decl.c (incomplete_var): Declare. Declare VECs containing them.
102 (incomplete_vars): Adjust comment. Change type to a VEC.
103 (maybe_register_incomplete_var): Adjust for new type.
104 (complete_vars): Adjust iteration over incomplete_vars.
106 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
108 * decl.c (struct named_label_entry): Change type of bad_decls field
110 (poplevel_named_label_1): Adjust for new type of bad_decls.
111 (check_goto): Likewise.
113 2010-06-29 Jason Merrill <jason@redhat.com>
115 Enable implicitly declared move constructor/operator= (N3053).
116 * class.c (add_implicitly_declared_members): A class with no
117 explicitly declared copy or move constructor gets both declared
118 implicitly, and similarly for operator=.
119 (check_bases): A type with no copy ctor does not inhibit
120 a const copy ctor in a derived class. It does mean the derived
122 (check_field_decl): Likewise.
123 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
124 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
125 (trivially_copyable_p): Likewise.
126 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
127 * class.c (finish_struct_bits): Likewise.
128 * tree.c (build_target_expr_with_type): Likewise.
129 * typeck2.c (store_init_value): Likewise.
131 Enable implicitly deleted functions (N2346)
132 * class.c (check_bases_and_members): Adjust lambda flags.
133 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
135 * decl2.c (mark_used): Adjust error for use of deleted function.
137 Machinery to support implicit delete/move.
138 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
139 has_complex_move_ctor, has_complex_move_assign bitfields.
140 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
141 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
142 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
143 (enum special_function_kind): Add sfk_move_assignment.
144 (LOOKUP_SPECULATIVE): New.
145 * call.c (build_over_call): Return early if it's set.
146 (build_over_call): Use trivial_fn_p.
147 * class.c (check_bases): If the base has no default constructor,
148 the derived one is non-trivial. Handle move ctor/op=.
149 (check_field_decl): Likewise.
150 (check_bases_and_members): Handle move ctor/op=.
151 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
152 (type_has_move_constructor, type_has_move_assign): New.
153 * decl.c (grok_special_member_properties): Handle move ctor/op=.
154 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
156 (do_build_copy_constructor): Use it.
157 (do_build_assign_ref): Likewise. Handle move assignment.
158 (build_stub_type, build_stub_object, locate_fn_flags): New.
159 (locate_ctor): Use locate_fn_flags.
160 (locate_copy, locate_dtor): Remove.
161 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
162 (process_subob_fn, synthesized_method_walk): New.
163 (maybe_explain_implicit_delete): New.
164 (implicitly_declare_fn): Use synthesized_method_walk,
165 type_has_trivial_fn, and type_set_nontrivial_flag.
166 (defaulted_late_check): Set DECL_DELETED_FN.
167 (defaultable_fn_check): Handle sfk_move_assignment.
168 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
169 implicitly deleted move ctor/op=.
170 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
171 (lookup_fnfields_slot): New.
172 * semantics.c (omp_clause_info_fndecl): Remove.
173 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
174 get_copy_assign, trivial_fn_p.
175 (trait_expr_value): Adjust call to locate_ctor.
176 * tree.c (special_function_p): Handle sfk_move_assignment.
178 * class.c (type_has_virtual_destructor): New.
179 * cp-tree.h: Declare it.
180 * semantics.c (trait_expr_value): Use it.
182 * call.c (build_over_call): Only give warnings with tf_warning.
184 * name-lookup.c (pop_scope): Handle NULL_TREE.
186 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
187 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
188 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
189 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
190 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
191 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
192 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
193 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
194 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
195 (sfk_assignment_operator): Rename to sfk_copy_assignment.
196 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
197 * search.c, semantics.c, tree.c: Adjust.
199 * pt.c (dependent_scope_ref_p): Remove.
200 (value_dependent_expression_p): Don't call it.
201 (type_dependent_expression_p): Here either.
202 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
203 if the scope isn't dependent.
205 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
209 * pt.c (has_value_dependent_address): New.
210 (value_dependent_expression_p): Check it.
211 (convert_nontype_argument): Likewise. Call decay_conversion before
212 folding if we want a pointer.
213 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
214 scope is the current instantiation.
216 2010-06-28 Jakub Jelinek <jakub@redhat.com>
219 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
222 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
224 * init.c: Do not include except.h.
227 * cp-lang.c: Likewise.
229 * semantics.c: Likewise.
231 * except.c: Likewise.
232 (init_exception_processing): Do not set the removed
233 lang_protect_cleanup_actions here.
234 (cp_protect_cleanup_actions): Make non-static and remove prototype.
235 (doing_eh): New, moved from except.c but removed the do_warning flag.
236 (expand_start_catch_block): Update doing_eh call.
237 (expand_end_catch_block): Likewise.
238 (build_throw): Likewise.
239 * cp-tree.h: Prototype cp_protect_cleanup_actions.
240 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
241 cp_protect_cleanup_actions.
242 * Make-lang.in: Update dependencies.
244 2010-06-26 Jason Merrill <jason@redhat.com>
246 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
247 constructor called with a single argument that takes a reference
248 to the constructor's class.
249 (BAD_CONVERSION_RANK): New.
250 (compare_ics): Use it to compare bad ICSes.
252 2010-06-25 Joseph Myers <joseph@codesourcery.com>
254 * lang-specs.h: Remove +e handling.
256 2010-06-24 Andi Kleen <ak@linux.intel.com>
258 * parser.c: (cp_parser_question_colon_clause):
259 Switch to use cp_lexer_peek_token.
260 Call warn_for_omitted_condop. Call pedwarn for omitted
263 2010-06-22 Jakub Jelinek <jakub@redhat.com>
266 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
267 datum and mark_rvalue_use on component.
270 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
271 the CALL_EXPR has no arguments.
273 2010-06-21 Jason Merrill <jason@redhat.com>
275 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
277 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
280 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
282 * name-lookup.c (struct arg_lookup): Convert namespaces and
283 classes fields to VEC.
284 (arg_assoc_namespace): Adjust for new type of namespaces.
285 (arg_assoc_class): Adjust for new type of classes.
286 (lookup_arg_dependent): Use make_tree_vector and
288 * typeck2.c (build_x_arrow): Use vec_member.
290 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
293 * error.c (dump_decl): Better wording for anonymous namespace.
295 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
297 * class.c (build_vtbl_initializer): Adjust computation of new_position
298 and which entry to add padding for.
300 2010-06-16 Jason Merrill <jason@redhat.com>
302 * except.c (check_noexcept_r): Return the problematic function.
303 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
304 * pt.c (tsubst_copy_and_build): Pass it.
305 * parser.c (cp_parser_unary_expression): Likewise.
306 * cp-tree.h: Adjust prototype.
308 * method.c (defaulted_late_check): Give the defaulted method
309 the same exception specification as the implicit declaration.
311 2010-06-15 Jason Merrill <jason@redhat.com>
313 * class.c (add_implicitly_declared_members): Implicit assignment
314 operators can also be virtual overriders.
315 * method.c (lazily_declare_fn): Likewise.
317 * call.c (convert_like_real): Give "initializing argument of"
318 information for ambiguous conversion. Give source position
321 * call.c (print_z_candidates): Do print viable deleted candidates.
322 (joust): Don't choose a deleted function just because its worst
323 conversion is better than another candidate's worst.
325 * call.c (convert_like_real): Don't complain about
326 list-value-initialization from an explicit constructor.
328 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
329 DECL_SOURCE_LOCATION directly.
331 * class.c (type_has_user_provided_default_constructor): Use
334 * call.c (is_subseq): Handle ck_aggr, ck_list.
335 (compare_ics): Treat an aggregate or ambiguous conversion to the
336 same type as involving the same function.
338 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
340 * typeck.c (convert_for_assignment): Fix comment. Change message
341 format from %d to %qP.
342 (convert_for_initialization): Fix comment.
344 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
346 * cp-tree.h (expr_list_kind): New type.
347 (impl_conv_rhs): New type.
348 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
350 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
351 diagnostics for easy translation. Change caller.
352 (convert_for_initialization): Use impl_conv_rhs and change caller.
353 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
354 diagnostics for easy translation. Change caller.
355 * decl.c (bad_spec_place): New enum.
356 (bad_specifiers): Use it and emit the diagnostics for easy
357 translation. Change caller.
358 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
360 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
362 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
364 * decl2.c (cp_write_global_declarations): Adjust for new type of
366 * name-lookup.c (current_decl_namespace): Likewise.
367 (push_decl_namespace): Likewise.
368 (pop_decl_namespace): Likewise.
370 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
372 * call.c (build_java_interface_fn_ref): Call build_function_type_list
373 instead of build_function_type.
374 * decl.c (cxx_init_decl_processing): Likewise.
375 (declare_global_var): Likewise.
376 (get_atexit_node): Likewise.
377 (expand_static_init): Likewise.
378 * decl2.c (start_objects): Likewise.
379 (start_static_storage_duration_function): Likewise.
380 * except.c (init_exception_processing): Likewise.
381 (build_exc_ptr): Likewise.
382 (build_throw): Likewise.
383 * rtti.c (throw_bad_cast): Likewise.
384 (throw_bad_typeid): Likewise.
385 (build_dynamic_cast_1): Likewise.
387 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
389 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
390 (build_op_delete_call): Likewise.
391 (build_over_call): Likewise.
392 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
393 * pt.c (process_partial_specialization): Likewise.
394 (tsubst_template_args): Likewise.
395 * semantics.c (finish_asm_stmt): Likewise.
397 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
399 * decl.c (record_key_method_defined): New, broken out of ...
400 (finish_function): ... here. Call it.
401 (start_decl): Treat aliases as definitions.
403 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
405 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
407 * pt.c (maybe_process_partial_specialization): Likewise.
408 (register_specialization): Likewise.
409 (add_pending_template): Likewise.
410 (lookup_template_class): Likewise.
411 (push_tinst_level): Likewise.
413 * parser.c (cp_lexer_new_main): Likewise.
414 (cp_lexer_new_from_tokens): Likewise.
415 (cp_token_cache_new): Likewise.
416 (cp_parser_context_new): Likewise.
417 (cp_parser_new): Likewise.
418 (cp_parser_nested_name_specifier_opt): Likewise.
419 (cp_parser_template_id): Likewise.
421 * name-lookup.c (binding_entry_make): Likewise.
422 (binding_table_construct): Likewise.
423 (binding_table_new): Likewise.
424 (cxx_binding_make): Likewise.
425 (pushdecl_maybe_friend): Likewise.
426 (begin_scope): Likewise.
427 (push_to_top_level): Likewise.
429 * lex.c (init_reswords): Likewise.
430 (retrofit_lang_decl): Likewise.
431 (cxx_dup_lang_specific_decl): Likewise.
432 (copy_lang_type): Likewise.
433 (cxx_make_type): Likewise.
435 * decl.c (make_label_decl): Likewise.
436 (check_goto): Likewise.
437 (start_preparsed_function): Likewise.
438 (save_function_data): Likewise.
440 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
442 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
444 * class.c (finish_struct_1): Likewise.
446 * cp-tree.h (struct lang_type): Add variable_size GTY option.
447 (struct lang_decl): Likewise.
449 * parser.c (cp_parser_new): Update comment to not reference
452 2010-06-07 Jason Merrill <jason@redhat.com>
455 * error.c (dump_parameters): Mask out TFF_SCOPE.
456 (dump_simple_decl): Don't print the scope of a PARM_DECL.
457 (dump_scope): Remove no-op mask.
460 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
462 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
463 * init.c (build_offset_ref): Use it.
464 * pt.c (maybe_process_partial_specialization): Use it.
465 (instantiate_class_template): Use it.
466 * search.c (lookup_base): Use it.
468 2010-06-07 Jakub Jelinek <jakub@redhat.com>
471 * expr.c (mark_exp_read): Handle INDIRECT_REF.
472 * cvt.c (convert_to_void): Handle INDIRECT_REF like
476 * decl.c (initialize_local_var): If TREE_USED is set on the type,
477 set also DECL_READ_P on the decl.
479 2010-05-25 Dodji Seketeli <dodji@redhat.com>
482 * cp-tree.h (typedef_variant_p): Move this declaration to
484 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
485 * decl.c (grokdeclarator): Do not rename debug info of an
486 anonymous tagged type named by a typedef.
488 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
491 * class.c (check_field_decls): Move the call to
492 check_bitfield_decl before trying to set the
493 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
495 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
497 * typeck.c: Update include path for moved files.
500 * cp-gimplify.c: Likewise.
501 * cp-lang.c: Likewise.
503 * semantics.c: Likewise.
504 * cxx-pretty-print.h: Likewise.
506 * parser.c: Likewise.
507 * cp-objcp-common.c: Likewise.
508 * cp-tree.h: Likewise.
509 * name-lookup.c: Likewise.
511 * name-lookup.h: Likewise.
512 * config-lang.in: Update paths in gtfiles for files in c-family/.
513 * Make-lang.in: Likewise.
515 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
517 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
518 * typeck.c (build_ptrmemfunc): Likewise.
520 2010-06-04 Jason Merrill <jason@redhat.com>
522 * typeck2.c (merge_exception_specifiers): Adjust merging of
523 throw() and noexcept(true).
525 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
526 using an uninitialized variable.
528 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
529 (pp_cxx_expression): Likewise.
531 Implement noexcept-specification (15.4)
532 * parser.c (cp_parser_exception_specification_opt): Parse it.
533 Give -Wdeprecated warning about throw() specs.
534 * pt.c (tsubst_exception_specification): Handle it.
535 * error.c (dump_exception_spec): Handle it.
536 (dump_expr): Handle NOEXCEPT_EXPR.
537 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
538 * typeck.c (comp_except_specs): Handle compatibility rules.
539 Change exact parm to take an enum.
540 * typeck2.c (merge_exception_specifiers): Handle noexcept.
541 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
542 (type_throw_all_p, build_noexcept_spec): New fns.
543 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
544 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
545 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
546 (noexcept_true_spec, noexcept_false_spec): New macros.
547 * name-lookup.c (pushdecl_maybe_friend): Adjust.
548 * search.c (check_final_overrider): Adjust.
549 * decl.c (check_redeclaration_exception_specification): Adjust.
550 (use_eh_spec_block): Use type_throw_all_p.
551 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
552 Give operator new a noexcept-specification in C++0x mode.
553 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
554 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
556 Implement noexcept operator (5.3.7)
557 * cp-tree.def (NOEXCEPT_EXPR): New.
558 * except.c (check_noexcept_r, finish_noexcept_expr): New.
559 * cp-tree.h: Declare finish_noexcept_expr.
560 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
561 * pt.c (tsubst_copy_and_build): And tsubst it.
562 (type_dependent_expression_p): Handle it.
563 (value_dependent_expression_p): Handle it.
565 * call.c (build_conditional_expr): Never fold in unevaluated context.
566 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
567 * semantics.c (simplify_aggr_init_expr): Likewise.
568 * typeck.c (merge_types): Call merge_exception_specifiers.
569 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
570 DECL_ANTICIPATED for preferring new type.
572 2010-06-04 Joseph Myers <joseph@codesourcery.com>
574 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
577 2010-06-04 Jakub Jelinek <jakub@redhat.com>
580 * typeck.c (build_class_member_access_expr): Call mark_exp_read
581 on object for static data members.
583 2010-06-04 Jakub Jelinek <jakub@redhat.com>
584 Jason Merrill <jason@redhat.com>
587 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
588 with the same type, call mark_lvalue_use on both.
590 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
592 * class.c (struct vtbl_init_data_s): Remove last_init field.
593 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
595 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
597 (build_vtt): Likewise.
598 (initialize_vtable): Take a VEC instead of a tree.
599 (build_vtt_inits): Change return type to void. Take a VEC **
600 instead of a tree *; accumulate results into said VEC.
601 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
602 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
603 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
605 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
606 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
608 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
609 rather than tree_cons.
610 (build_vbase_offset_vtbl_entries): Likewise.
611 (add_vcall_offset): Likewise.
612 (build_rtti_vtbl_entries): Likewise.
613 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
614 * decl.c (initialize_artificial_var): Use build_constructor instead
615 of build_constructor_from_list.
617 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
620 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
623 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
625 * parser.c (cp_parser_mem_initializer_list): Change error text.
627 2010-06-02 Jakub Jelinek <jakub@redhat.com>
629 * cp-objcp-common.c (shadowed_var_for_decl): Change into
630 tree_decl_map hashtab from tree_map.
631 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
632 (init_shadowed_var_for_decl): Adjust initialization.
635 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
636 instead of calling mark_exp_read only when not an assignment.
639 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
640 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
641 Set DECL_VALUE_EXPR on var.
643 2010-06-02 Jason Merrill <jason@redhat.com>
645 * error.c (dump_type): Improve typedef handling.
650 * name-lookup.c (same_entity_p): New.
651 (ambiguous_decl): Multiple declarations of the same entity
654 2010-06-01 Jason Merrill <jason@redhat.com>
657 * call.c (add_list_candidates): Prefer the default constructor.
658 (build_aggr_conv): Treat missing initializers like { }.
659 * typeck2.c (process_init_constructor_record): Likewise.
660 * init.c (expand_default_init): Use digest_init for
661 direct aggregate initialization, too.
663 * call.c (add_list_candidates): Split out...
664 (build_user_type_conversion_1): ...from here.
665 (build_new_method_call): And here.
666 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
669 * call.c (build_list_conv): Set list-initialization flags properly.
671 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
673 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
675 2010-06-01 Arnaud Charlet <charlet@adacore.com>
676 Matthew Gingell <gingell@adacore.com>
678 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
679 * decl2.c: Include langhooks.h and c-ada-spec.h.
680 (cpp_check, collect_source_refs, collect_ada_namespace,
681 collect_all_refs): New functions.
682 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
683 * lang-specs.h: Ditto.
685 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
687 * cp-tree.h (cp_build_function_call_nary): Declare.
688 * typeck.c (cp_build_function_call_nary): Define.
689 * decl.c (register_dtor_fn): Use it instead of
690 cp_build_function_call.
691 (cxx_maybe_build_cleanup): Likewise.
692 * decl2.c (generate_ctor_or_dtor_function): Likewise.
693 * except.c (do_get_exception_ptr): Likewise.
694 (do_begin_catch): Likewise.
695 (do_allocate_exception): Likewise.
696 (do_free_exception): Likewise.
697 (build_throw): Likewise. Use cp_build_function_call_vec instead
698 of cp_build_function_call.
699 (do_end_catch): Likewise.
701 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
703 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
704 (struct cp_declarator): Move id_loc field up.
706 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
708 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
709 this file is included before c-common.h. Define GCC_DIAG_STYLE
710 before including diagnostic-core.h and toplev.h.
711 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
712 * pt.c: Include cp-tree.h before c-common.h.
714 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
716 * tree.c (c_register_addr_space): Add stub.
718 2010-05-28 Joseph Myers <joseph@codesourcery.com>
720 * g++spec.c (lang_specific_driver): Use fatal_error instead of
723 2010-05-28 Dodji Seketeli <dodji@redhat.com>
725 Revert fix of PR c++/44188
726 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
728 * tree.c (typedef_variant_p): Revert moving this definition to
730 * decl.c (grokdeclarator): Revert naming typedef handling.
732 2010-05-27 Joseph Myers <joseph@codesourcery.com>
734 * call.c: Include diagnostic-core.h instead of diagnostic.h.
735 * cp-lang.c: Don't include diagnostic.h
736 * name-lookup.c: Include diagnostic-core.h instead of
738 (cp_emit_debug_info_for_using): Use seen_error.
739 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
740 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
741 * pt.c (iterative_hash_template_arg): Use seen_error.
742 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
743 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
744 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
745 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
748 2010-05-25 Dodji Seketeli <dodji@redhat.com>
751 * cp-tree.h (typedef_variant_p): Move this declaration to
753 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
754 * decl.c (grokdeclarator): Do not rename debug info of an
755 anonymous tagged type named by a typedef.
757 2010-05-27 Jason Merrill <jason@redhat.com>
760 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
763 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
766 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
767 * class.c (layout_class_type): Likewise.
768 * decl.c (finish_enum): Likewise.
769 * mangle.c (write_builitin_type): Likewise.
771 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
773 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
775 * decl.c (grokdeclarator): Handle __int128.
776 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
777 (cp_parser_simple_type_specifier): Likewise.
778 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
779 * typeck.c (cp_common_type): Handle __int128.
780 * mangle.c (integer_type_codes): Add itk_int128 and
783 2010-05-26 Jason Merrill <jason@redhat.com>
786 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
789 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
791 * cp-lang.c: Do not include expr.h.
793 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
795 * decl.c: Do not include rtl.h
796 * semantics.c: Likewise.
798 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
800 * cp-tree.h: Do not include splay-tree.h.
801 (struct prtmem_cst): Remove unused field and false comment.
802 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
803 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
804 * init.c: Do not include rtl.h and expr.h.
805 * class.c: Do not include rtl.h. Include splay-tree.h.
806 (build_clone): Use plain NULL instead of NULL_RTX.
807 * decl.c: Do not include expr.h. Explain why rtl.h has to be
808 included. Include splay-tree.h.
809 * method.c: Do not include rtl.h and expr.h.
810 (use_thunk): Use plain NULL instead of NULL_RTX.
811 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
812 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
813 and target.h. Include splay-tree.h.
814 * expr.c: Do not include rtl.h and expr.h.
815 * pt.c: Do not include obstack.h and rtl.h.
816 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
817 (tsubst_decl): Likewise.
818 (instantiate_decl): Likewise.
819 * semantics.c: Do not include exprt.h and debug.h. Explain why
820 rtl.h has to be included.
821 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
822 * call.c: Do not include rtl.h and expr.h.
823 * search.c: Do not include obstack.h and rtl.h.
824 * friend.c: Do not include rtl.h and expr.h.
825 * Make-lang.in: Update dependencies.
827 2010-05-25 Jakub Jelinek <jakub@redhat.com>
830 * parser.c (non_integral_constant): Add NIC_NONE.
831 (required_token): Add RT_NONE.
832 (cp_parser_unary_expression): Initialize non_constant_p
834 (cp_parser_asm_definition): Initialize missing to RT_NONE.
835 (cp_parser_primary_expression, cp_parser_postfix_expression,
836 cp_parser_cast_expression, cp_parser_binary_expression,
837 cp_parser_functional_cast): Fix formatting.
839 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
842 * parser.c: Remove inclusion of dyn-string.h.
843 (non_integral_constant): New enum.
844 (name_lookup_error): New enum.
845 (required_token): New enum.
846 (cp_parser_required_error): New function.
847 (cp_parser_require): Change the type of variable token_desc to
848 required_token and use cp_parser_required_error.
849 (cp_parser_require_keyword): Likewise.
850 (cp_parser_error): Use gmsgid as parameter.
851 (cp_parser_name_lookup_error): Change the type of variable desired to
852 name_lookup_error and put the diagnostic in the full sentences. Change
854 (cp_parser_non_integral_constant_expression): Change the type of the
855 variable thing to non_integral_constant and put the diagnostics in
856 full sentences. Change caller.
858 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
861 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
863 2010-05-24 Joseph Myers <joseph@codesourcery.com>
865 * error.c (cp_diagnostic_starter): Update call to
866 diagnostic_build_prefix.
867 (cp_print_error_function,
868 print_instantiation_partial_context_line): Check show_column flag
871 2010-05-24 Jason Merrill <jason@redhat.com>
874 * decl.c (check_initializer): Don't wrap an init-list in a
876 * init.c (build_aggr_init): Don't assume copy-initialization if
877 init has CONSTRUCTOR_IS_DIRECT_INIT.
878 * call.c (build_new_method_call): Sanity check.
880 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
882 * rtti.c (tinfo_base_init): Use build_constructor instead of
883 build_constructor_from_list. Don't cons a tree node for
885 (generic_initializer): Use build_constructor_single instead of
886 build_constructor_from_list.
887 (ptr_initializer): Use build_constructor instead of
888 build_constructor_from_list
889 (ptm_initializer): Likewise.
890 (class_initializer): Likewise. Take varargs instead of TRAIL.
891 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
892 build_constructor instead of build_constructor_from_list.
894 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
896 * semantics.c: Include bitmap.h.
897 * Make-lang.in: Update dependencies.
899 2010-05-22 Jan Hubicka <jh@suse.cz>
901 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
903 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
905 2010-05-21 Joseph Myers <joseph@codesourcery.com>
907 * cxx-pretty-print.c: Correct merge error.
909 2010-05-21 Joseph Myers <joseph@codesourcery.com>
911 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
912 (cp_print_error_function): Use diagnostic_abstract_origin macro.
913 (cp_printer): Handle %K here using percent_K_format.
914 * cxx-pretty-print.c: Include tree-pretty-print.h.
915 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
918 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
920 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
921 Clean up redundant includes.
923 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
926 * decl.c (xref_basetypes): Return false in case of ill-formed
929 2010-05-19 Jason Merrill <jason@redhat.com>
931 * call.c (reference_binding): Use cp_build_qualified_type_real
932 and cp_type_quals consistently.
933 (add_function_candidate): Likewise.
934 (build_conditional_expr): Likewise.
935 (convert_like_real): Likewise.
936 (type_passed_as): Likewise.
937 * class.c (add_method): Likewise.
938 (same_signature_p): Likewise.
939 (layout_class_type): Likewise.
940 * decl.c (cxx_init_decl_processing): Likewise.
941 (cp_fname_init): Likewise.
942 (grokdeclarator): Likewise.
943 * decl2.c (cp_reconstruct_complex_type): Likewise.
944 * init.c (build_new_1): Likewise.
945 * method.c (do_build_copy_constructor): Likewise.
946 (implicitly_declare_fn): Likewise.
947 * pt.c (tsubst_aggr_type): Likewise.
949 * rtti.c (init_rtti_processing): Likewise.
950 (build_headof): Likewise.
951 (build_dynamic_cast_1): Likewise.
952 (tinfo_base_init): Likewise.
953 (emit_support_tinfos): Likewise.
954 * semantics.c (capture_decltype): Likewise.
955 * tree.c (cv_unqualified): Likewise.
956 * typeck.c (composite_pointer_type): Likewise.
957 (string_conv_p): Likewise.
959 * mangle.c (write_CV_qualifiers_for_type): Tweak.
961 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
962 * decl.c (start_decl): Likewise.
963 * semantics.c (finish_compound_literal): Likewise.
964 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
965 (cp_type_readonly): Remove.
966 * cp-tree.h: Remove declaration.
968 * typeck.c (merge_types): Preserve memfn quals.
970 * decl.c (grokdeclarator): Don't check quals on fn type.
971 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
972 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
975 * typeck.c (type_memfn_quals): New fn.
976 (apply_memfn_quals): New fn.
977 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
978 (cp_type_readonly): Use cp_type_quals.
979 * cp-tree.h: Add declarations.
980 * tree.c (cp_build_qualified_type_real): Don't set, but do
981 preserve, quals on FUNCTION_TYPE.
982 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
983 * decl.c (build_ptrmem_type): Likewise.
984 (grokdeclarator): Likewise.
985 (static_fn_type): Likewise.
986 * decl2.c (change_return_type): Likewise.
987 (cp_reconstruct_complex_type): Likewise.
988 * pt.c (tsubst_function_type): Likewise.
990 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
992 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
994 * tree.c (build_min_non_dep_call_vec): Update comment.
996 2010-05-17 Jason Merrill <jason@redhat.com>
998 * call.c (struct z_candidate): Add explicit_targs field.
999 (add_template_candidate_real): Set it.
1000 (build_over_call): Use it to control init-list warning.
1003 * call.c (build_over_call): Limit init-list deduction warning to
1004 cases where the argument is actually an init-list.
1007 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1009 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1010 Jason Merrill <jason@redhat.com>
1013 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1015 2010-05-15 Jason Merrill <jason@redhat.com>
1017 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1018 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1020 (finish_eh_spec_block): Adjust.
1022 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1025 * pt.c (tsubst): Unshare template argument.
1027 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1029 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1030 * Make-lang.in: Fix dependencies accordingly.
1032 2010-05-14 Jason Merrill <jason@redhat.com>
1035 * except.c (build_throw): Simplify, adjust for DR 475.
1038 * except.c (dtor_nothrow): Return nonzero for type with
1042 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1043 gimple_build_eh_must_not_throw.
1045 2010-05-14 Martin Jambor <mjambor@suse.cz>
1047 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1050 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1052 * call.c (build_new_method_call): Change warning text.
1053 * typeck2.c (build_functional_cast): Change error text.
1055 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1058 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1059 shadowing the outer parameter or variables by the declaration of
1060 nested function in nested structure or class. Warn the shadowing by
1061 the declaration of nested lambda expression.
1063 2010-05-13 Jason Merrill <jason@redhat.com>
1065 * typeck.c (cp_build_array_ref): Factor out from...
1066 (build_array_ref): ...here. Drop complain parm.
1067 (build_new_op): Adjust.
1068 * class.c (build_vtbl_ref_1): Adjust.
1069 * decl2.c (grok_array_decl): Adjust.
1070 * cp-tree.h: Adjust prototypes.
1072 2010-05-13 Jan Hubicka <jh@suse.cz>
1074 * decl.c (cp_finish_decl): Do not worry about used attribute.
1076 2010-05-12 Jason Merrill <jason@redhat.com>
1078 * typeck.c (build_array_ref): Take complain parm.
1079 * cp-tree.h: Add it to prototype.
1080 * call.c (build_new_op): Pass it.
1081 * class.c (build_vtbl_ref): Pass it.
1082 * decl2.c (grok_array_decl): Pass it.
1086 * cp-tree.def (NULLPTR_TYPE): Remove.
1087 * cp-tree.h (NULLPTR_TYPE_P): New.
1088 (SCALAR_TYPE_P): Use it.
1089 (nullptr_type_node): New.
1090 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1091 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1093 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1094 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1095 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1096 * mangle.c (write_type): Likewise.
1097 * name-lookup.c (arg_assoc_type): Likewise.
1098 * typeck.c (build_reinterpret_cast_1): Likewise.
1099 * rtti.c (typeinfo_in_lib_p): Likewise.
1100 (emit_support_tinfos): Remove local nullptr_type_node.
1102 * cp-tree.h (UNKNOWN_TYPE): Remove.
1103 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1104 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1105 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1106 * class.c (instantiate_type): Check unknown_type_node rather than
1108 * name-lookup.c (maybe_push_decl): Likewise.
1109 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1110 (get_typeid): Likewise.
1111 * semantics.c (finish_offsetof): Likewise.
1114 * call.c (add_template_candidate_real): If deduction fails, still
1115 add the template as a non-viable candidate.
1116 (equal_functions): Handle template candidates.
1117 (print_z_candidate): Likewise.
1118 (print_z_candidates): Likewise.
1119 (build_new_function_call): Likewise.
1121 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1122 * call.c (add_candidates): Enforce it.
1123 (build_new_method_call): Try non-list ctor if no viable list ctor.
1124 (build_user_type_conversion_1): Likewise.
1126 * call.c (add_candidates): Distinguish between type(x) and
1128 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1129 (build_new_method_call): Give better error for conversion op.
1131 * call.c (add_candidates): Add first_arg and return_type parms.
1132 Add special constructor/conversion op handling.
1133 (convert_class_to_reference): Use it.
1134 (build_user_type_conversion_1): Likewise.
1135 (build_op_call): Likewise.
1136 (build_new_method_call): Likewise.
1137 (build_new_op): Adjust.
1138 (perform_overload_resolution): Adjust.
1140 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1145 * pt.c (process_partial_specialization): Return error_mark_node
1146 in case of unused template parameters in partial specialization.
1148 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1151 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1152 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1153 look at its second operand.
1155 2010-05-10 Jason Merrill <jason@redhat.com>
1158 * semantics.c (baselink_for_fns): Revert earlier change.
1161 * typeck.c (cp_build_modify_expr): Complain about assignment to
1162 array from init list.
1164 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1167 * decl.c (check_initializer): strip array type before checking for
1168 uninitialized const or ref members.
1170 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1173 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1174 error count. Emit errors only if compain is true.
1175 (build_new_1): Do not return error_mark_node if
1176 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1177 errors. Delay the check for user-provided constructor.
1178 (perform_member_init): Adjust.
1179 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1182 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1183 Jason Merrill <jason@redhat.com>
1185 Add support for C++0x nullptr.
1186 * cp-tree.def: Add NULLPTR_TYPE.
1187 * cp-tree.h: Add nullptr_node.
1188 (cp_tree_index): Add CPTI_NULLPTR.
1189 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1190 * call.c (null_ptr_cst_p): Handle nullptr.
1191 (standard_conversion): Likewise.
1192 (convert_arg_to_ellipsis): Likewise.
1193 * mangle.c (write_type): Likewise.
1194 * name-lookup.c (arg_assoc_type): Likewise.
1195 * parser.c (cp_parser_primary_expression): Likewise.
1196 * typeck.c (cp_build_binary_op): Likewise.
1197 (build_reinterpret_cast_1): Likewise.
1198 * error.c (dump_type): Likewise.
1199 (dump_type_prefix, dump_type_suffix): Likewise.
1200 * decl.c (cxx_init_decl_processing): Likewise.
1201 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1202 * cvt.c (ocp_convert): Likewise.
1203 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1204 nullptr_t tinfo in libsupc++.
1206 2010-05-06 Jason Merrill <jason@redhat.com>
1208 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1210 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1211 Dodji Seketeli <dodji@redhat.com>
1214 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1216 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1217 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1218 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1219 (cp_build_unary_op): Call lvalue_use.
1220 * decl.c (unused_but_set_errorcount): New variable.
1221 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1222 (duplicate_decls): Merge DECL_READ_P flags.
1223 (start_cleanup_fn): Set DECL_READ_P flag.
1224 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1225 * tree.c (rvalue): Call rvalue_use.
1226 * pt.c (convert_nontype_argument): Likewise.
1227 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1228 finish_decltype_type): Likewise.
1229 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1230 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1231 or rvalue_use depending on the expr.
1232 * init.c (build_new, build_delete): Likewise.
1233 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1235 2010-05-05 Jason Merrill <jason@redhat.com>
1238 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1239 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1241 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1244 * pt.c (unify): Check each elt for error_mark_node.
1246 2010-05-04 Jason Merrill <jason@redhat.com>
1249 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1251 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1254 * call.c (build_new_method_call): Return error_mark_node if fns is
1257 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1260 * pt.c (most_specialized_class): Pretend we are processing
1261 a template decl during the call to coerce_template_parms.
1263 2010-05-03 Jason Merrill <jason@redhat.com>
1267 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1268 from the selected underlying type unless -fstrict-enums. Set
1269 ENUM_UNDERLYING_TYPE to have the restricted range.
1270 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
1271 * class.c (check_bitfield_decl): Likewise.
1273 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
1276 * init.c (build_new_1): Revert the accidental checkin in
1279 2010-04-30 Jason Merrill <jason@redhat.com>
1282 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
1283 (pp_cxx_type_specifier_seq): ...here.
1285 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1287 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
1288 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1290 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
1293 * typeck.c (warn_args_num): New function.
1294 (convert_arguments): Use warn_args_num to print the diagnostic
1297 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
1300 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1301 user-provided constructor while recursing.
1303 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
1306 * error.c (print_instantiation_partial_context_line): Handle
1307 recursive instantiation.
1308 (print_instantiation_partial_context): Likewise.
1310 2010-04-27 Jason Merrill <jason@redhat.com>
1312 * init.c (perform_member_init): Check CLASS_TYPE_P.
1314 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1317 * init.c (perform_member_init): check for uninitialized const or
1318 reference members, including array types.
1320 2010-04-24 Jason Merrill <jason@redhat.com>
1322 * tree.c (get_fns): Split out from get_first_fn.
1323 * cp-tree.h: Declare it.
1324 * search.c (shared_member_p): Use it.
1325 * semantics.c (finish_qualified_id_expr): Simplify.
1326 (finish_id_expression): Simplify.
1328 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1329 whenever object is NULL_TREE. Don't do 'this' capture here.
1330 (finish_qualified_id_expr): Pass NULL_TREE.
1331 (finish_id_expression): Likewise.
1332 (lambda_expr_this_capture): Likewise.
1334 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1335 rather than checking current_class_ref directly.
1336 (finish_call_expr): Likewise.
1339 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1340 * class.c (current_nonlambda_class_type): New fn.
1341 * semantics.c (nonlambda_method_basetype): New.
1342 * cp-tree.h: Declare them.
1343 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1345 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1348 * semantics.c (lambda_return_type): Complain about
1352 * tree.c (cv_unqualified): Handle error_mark_node.
1355 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1356 if we don't want errors.
1359 * class.c (convert_to_base): Add complain parameter. Pass
1360 ba_quiet to lookup_base if we don't want errors.
1361 (build_vfield_ref): Pass complain to convert_to_base.
1362 * call.c (convert_like_real): Likewise.
1363 (initialize_reference): Likewise.
1364 (perform_direct_initialization_if_possible): Pass complain to
1366 * cp-tree.h: Adjust.
1368 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1369 Jason Merrill <jason@redhat.com>
1372 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1374 (check_initializer): Call it for classes that need constructing, too.
1375 * class.c (in_class_defaulted_default_constructor): New.
1376 * cp-tree.h: Declare it.
1378 2010-04-20 Jason Merrill <jason@redhat.com>
1381 * init.c (constant_value_1): Treat error_mark_node as a constant
1382 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1383 * cvt.c (ocp_convert): Handle getting error_mark_node from
1384 integral_constant_value.
1385 * decl.c (compute_array_index_type): Likewise.
1387 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1391 * typeck.c (incompatible_dependent_types_p): If one of the
1392 compared types if not a typedef then honour their main variant
1395 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1397 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1399 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1402 * typeck.c (structural_comptypes): Test dependent typedefs
1403 incompatibility before testing for their main variant based
1406 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1408 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1409 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1411 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1413 * decl.c (cxx_init_decl_processing): Remove second argument in call to
1414 build_common_tree_nodes.
1416 2010-04-14 Jason Merrill <jason@redhat.com>
1419 * parser.c (cp_parser_parenthesized_expression_list): Change
1420 is_attribute_list parm to int to indicate whether or not to
1421 handle initial identifier specially.
1422 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1424 2010-04-13 Jason Merrill <jason@redhat.com>
1426 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1428 * parser.c (cp_parser_lambda_expression): Complain about lambda in
1429 unevaluated context.
1430 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1432 2010-04-12 Jason Merrill <jason@redhat.com>
1435 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1436 return value directly.
1438 * call.c (type_decays_to): Call cv_unqualified for non-class type.
1440 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
1443 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1444 * init.c (build_new_1): Check for uninitialized const members and
1445 uninitialized reference members, when using new without
1446 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1447 (diagnose_uninitialized_cst_or_ref_member): Define, call
1448 diagnose_uninitialized_cst_or_ref_member_1.
1449 (diagnose_uninitialized_cst_or_ref_member_1): New function.
1451 2010-04-12 Richard Guenther <rguenther@suse.de>
1454 * semantics.c (expand_or_defer_fn_1): Do not keep extern
1455 template inline functions.
1457 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1460 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1463 2010-04-07 Jason Merrill <jason@redhat.com>
1466 * decl.c (start_preparsed_function): Do defer nested functions.
1468 PR c++/11094, DR 408
1469 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1470 * decl2.c (finish_static_data_member_decl): Set it.
1471 * decl.c (duplicate_decls): Propagate it.
1472 * pt.c (tsubst_decl): Don't substitute the domain of an array
1473 VAR_DECL if it's set.
1474 (regenerate_decl_from_template): Substitute it here.
1475 (type_dependent_expression_p): Return true if it's set.
1476 * semantics.c (finish_decltype_type): Instantiate such a variable.
1477 * typeck.c (cxx_sizeof_expr): Likewise.
1478 (strip_array_domain): New.
1481 * name-lookup.c (current_decl_namespace): Non-static.
1482 (pop_nested_namespace): Sanity check.
1483 * cp-tree.h: Declare current_decl_namespace.
1484 * decl.c (grokvardecl): Use it instead of current_namespace.
1485 (grokfndecl): Likewise.
1488 * pt.c (tsubst_friend_function): Instatiate a friend that has already
1491 * pt.c (print_template_statistics): New.
1492 * cp-tree.h: Declare it.
1493 * tree.c (cxx_print_statistics): Call it.
1496 * decl.c (grokvardecl): Tweak warning message.
1497 (grokfndecl): Likewise.
1499 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1502 *pt.c (tsubst_decl): Get the arguments of a specialization from
1503 the specialization template, not from the most general template.
1505 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1508 * typeck2.c (process_init_constructor_record):
1509 value-initialize members that are are not explicitely
1512 2010-04-07 Jie Zhang <jie@codesourcery.com>
1515 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
1516 when all of its elements are non-constant and have been split out.
1518 2010-04-06 Taras Glek <taras@mozilla.com>
1519 Jason Merrill <jason@redhat.com>
1521 * parser.c (cp_parser_class_specifier): Set class location to that
1522 of IDENTIFIER_NODE instead of '{' when possible.
1523 * semantics.c (begin_class_definition): Do not overide locations
1524 with less precise ones.
1526 2010-04-06 Jason Merrill <jason@redhat.com>
1529 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
1532 * pt.c (maybe_update_decl_type): Check the return value from
1535 2010-04-01 Jason Merrill <jason@redhat.com>
1537 * decl.c (next_initializable_field): No longer static.
1538 * cp-tree.h: Declare it.
1539 * call.c (build_aggr_conv): Fail if there are more initializers
1540 than initializable fields.
1542 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
1543 instead of void_zero_node.
1545 2010-03-31 Dodji Seketeli <dodji@redhat.com>
1548 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
1549 * pt.c (end_template_parm_list): Store sibling template parms of
1550 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1551 (push_template_decl_real): Don't store the containing template decl
1552 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
1553 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
1554 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1557 2010-03-30 Jason Merrill <jason@redhat.com>
1560 * pt.c (push_template_decl_real): Deal better with running out of
1561 scopes before running out of template parms.
1565 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
1566 function parameter context. Don't print an error if parsing
1570 * pt.c (more_specialized_fn): Don't control cv-qualifier check
1573 2010-03-26 Jason Merrill <jason@redhat.com>
1576 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
1577 c++0x mode, but not other type-names.
1579 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1582 * pt.c (add_to_template_args): Support NULL ARGS;
1583 (most_specialized_class): call coerce_template_parms on
1584 template arguments passed to get_class_bindings. Use
1585 add_to_template_args.
1586 (unify): Handle VAR_DECLs.
1588 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1590 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
1592 * pt.c (get_template_parms_at_level): Adjust.
1594 2010-03-25 Dodji Seketeli <dodji@redhat.com>
1597 * cp-tree.h (get_template_parms_at_level): Declare ...
1598 * pt.c (get_template_parms_at_level): ... new function.
1599 * typeck.c (get_template_parms_of_dependent_type): If a template
1600 type parm's DECL_CONTEXT isn't yet set, get its siblings from
1601 current_template_parms. Use get_template_parms_at_level. Remove
1603 (incompatible_dependent_types_p): If we get empty parms from just one
1604 of the template type parms we are comparing then the template parms are
1607 2010-03-24 Jason Merrill <jason@redhat.com>
1610 * parser.c (make_declarator): Initialize id_loc.
1611 (cp_parser_lambda_declarator_opt): And set it.
1613 2010-03-23 Jason Merrill <jason@redhat.com>
1615 Make lambda conversion op and op() non-static.
1616 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
1617 Also add the thunk function returned by the conversion op.
1618 Mark the conversion deleted if the op() is variadic.
1619 * decl2.c (mark_used): Give helpful message about deleted conversion.
1620 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
1621 * semantics.c (finish_this_expr): Adjust.
1622 * mangle.c (write_closure_type_name): Adjust.
1623 * decl.c (grok_op_properties): Don't allow it.
1624 * call.c (build_user_type_conversion_1): No static conversion ops.
1625 (build_op_call): Or op().
1627 * decl2.c (change_return_type): Fix 'this' quals.
1629 2010-03-22 Jason Merrill <jason@redhat.com>
1632 * tree.c (pod_type_p): Use old meaning in C++98 mode.
1635 * pt.c (contains_auto_r): New fn.
1636 (do_auto_deduction): Use it.
1637 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
1639 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
1642 * decl2.c (grokfield): Handle invalid initializers for member
1645 2010-03-20 Dodji Seketeli <dodji@redhat.com>
1648 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
1650 * decl2.c (vague_linkage_p): Likewise.
1652 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1655 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
1656 false, in the cp_parser_expression_statement call.
1658 2010-03-05 Jason Merrill <jason@redhat.com>
1660 * mangle.c (mangle_decl): Give name collision error even without
1663 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
1665 * pt.c (process_partial_specialization): Use error_n instead of
1668 2010-03-03 Jason Merrill <jason@redhat.com>
1671 * mangle.c (mangle_decl): Handle VAR_DECL, too.
1673 2010-03-03 Jason Merrill <jason@redhat.com>
1676 * mangle.c: Include cgraph.h.
1677 (mangle_decl): If the mangled name will change in a later
1678 ABI version, make the later mangled name an alias.
1679 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
1680 * Make-lang.in (mangle.o): Depend on cgraph.h.
1681 * method.c (make_alias_for): Handle VAR_DECL, too.
1682 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
1683 * tree.c (no_linkage_check): Adjust.
1684 * decl.c (maybe_commonize_var): Adjust.
1685 * cp-tree.h: Adjust.
1687 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
1689 * pt.c (redeclare_class_template): Use error_n and inform_n.
1691 2010-02-27 Mark Mitchell <mark@codesourcery.com>
1694 * cp-tree.h (push_tinst_level): Declare.
1695 (pop_tinst_level): Likewise.
1696 * pt.c (push_tinst_level): Give it external linkage.
1697 (pop_tinst_level): Likewise.
1698 * mangle.c (mangle_decl_string): Set the source location to that
1699 of the decl while mangling.
1701 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
1704 * pt.c (redeclare_class_template): Return false if there are erroneous
1705 template parameters.
1707 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1709 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
1712 2010-02-24 Jason Merrill <jason@redhat.com>
1715 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
1717 * class.c (layout_class_type): Don't give -Wabi warning for a bug
1718 in a previous ABI version.
1720 2010-02-23 Jason Merrill <jason@redhat.com>
1723 * typeck2.c (digest_init_r): Accept value init of array.
1725 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1728 * typeck.c (convert_arguments): Update error message.
1730 2010-02-22 Mike Stump <mikestump@comcast.net>
1733 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
1735 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1738 * error.c (print_instantiation_partial_context_line): New.
1739 (print_instantiation_partial_context): Print at most 12 contexts,
1740 skip the rest with a message.
1742 2010-02-21 Dodji Seketeli <dodji@redhat.com>
1745 * pt.c (lookup_template_class): Better support of specialization
1746 of member of class template implicit instantiation.
1748 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1751 * call.c (conversion_null_warnings): Replace -Wconversion with
1753 * cvt.c (build_expr_type_conversion): Likewise.
1755 2010-02-18 Jason Merrill <jason@redhat.com>
1758 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
1761 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
1763 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
1764 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
1767 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
1771 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
1772 (maybe_update_decl_type): New fn.
1773 * parser.c (cp_parser_init_declarator): Use it.
1776 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
1778 2010-02-17 Jason Merrill <jason@redhat.com>
1781 * call.c (build_over_call): Don't create zero-sized assignments.
1782 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
1783 * cp-objcp-common.c (cp_expr_size): Remove.
1784 * cp-tree.h: Remove prototype.
1787 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
1788 decl we looked up doesn't match.
1791 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
1792 have an INIT_EXPR anymore.
1795 * pt.c (convert_nontype_argument): Change assert to test.
1797 2010-02-16 Jason Merrill <jason@redhat.com>
1799 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
1802 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
1803 VIEW_CONVERT_EXPR for conversions between structural equality types
1804 that the back end can't tell are the same.
1807 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
1808 cv-quals from element here.
1809 (cp_build_qualified_type_real): Not here. Preserve typedef name.
1811 2010-02-14 Jason Merrill <jason@redhat.com>
1814 * semantics.c (finish_compound_literal): Use
1815 cp_apply_type_quals_to_decl when creating a static variable.
1817 2010-02-12 Jason Merrill <jason@redhat.com>
1820 * name-lookup.h (current_binding_level): Check for null
1823 2010-02-12 Jason Merrill <jason@redhat.com>
1826 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
1828 2010-02-12 Jakub Jelinek <jakub@redhat.com>
1831 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
1834 2010-02-10 Jason Merrill <jason@redhat.com>
1837 * semantics.c (outer_lambda_capture_p): Revert.
1838 (add_capture): Only finish_member_declaration if
1839 we're in the lambda class.
1840 (register_capture_members): New.
1841 * cp-tree.h: Declare it.
1842 * parser.c (cp_parser_lambda_expression): Call it.
1844 2010-02-10 Jason Merrill <jason@redhat.com>
1847 * semantics.c (outer_lambda_capture_p): Use current_function_decl
1848 instead of current_class_type.
1850 2010-02-10 Jason Merrill <jason@redhat.com>
1852 PR c++/42983, core issue 906
1853 * method.c (defaultable_fn_check): Check virtualness.
1855 2010-02-10 Jason Merrill <jason@redhat.com>
1858 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
1860 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
1862 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
1863 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
1865 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
1866 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
1867 (cp_parser_parameter_declaration)
1868 (cp_parser_exception_specification_opt)
1869 (cp_parser_exception_declaration): Likewise.
1870 * pt.c (check_default_tmpl_args): Likewise.
1871 * search.c (lookup_field_r): Likewise.
1873 2010-02-09 Jason Merrill <jason@redhat.com>
1876 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
1878 2010-02-09 Jason Merrill <jason@redhat.com>
1881 * decl2.c (change_return_type): New fn.
1882 * semantics.c (apply_lambda_return_type): Use it.
1883 * cp-tree.h: Declare it.
1885 2010-02-05 Richard Guenther <rguenther@suse.de>
1887 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
1888 * cp-lang.c: Include gt-cp-cp-lang.h.
1889 * config-lang.in (gtfiles): Add cp/cp-lang.c.
1891 2010-02-05 Dodji Seketeli <dodji@redhat.com>
1894 * typeck.c (get_template_parms_of_dependent_type): Try getting
1895 the template parameters fromt the type itself first.
1897 2010-02-03 Jason Merrill <jason@redhat.com>
1901 * mangle.c (write_unqualified_id): Split out from write_expression.
1902 (write_unqualified_name): Call it.
1903 (write_member_name): Likewise.
1904 (write_expression): Support TEMPLATE_ID_EXPR.
1905 Disambiguate operator names.
1908 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
1911 2010-02-02 Jason Merrill <jason@redhat.com>
1914 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
1915 * optimize.c (clone_body): Remap their initializers when making base
1917 (maybe_clone_body): Complain if multiple clones aren't safe.
1919 2010-01-29 Dodji Seketeli <dodji@redhat.com>
1926 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1927 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1928 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
1929 * pt.c (coerce_template_parms, type_unification_real,
1930 expand_template_argument_pack, coerce_template_parameter_pack):
1931 Set the non default template args count.
1932 (current_template_args): Always set non defaulted
1933 template args count when compiled with --enable-checking
1934 (tsubst_template_args, type_unification_real): Propagate the non
1935 defaulted template args count.
1936 * error.c (get_non_default_template_args_count): Renamed
1937 count_non_default_template_args into this. Don't calculate the
1938 non default template argument count anymore. Use the new
1939 accessor macros above to get it.
1940 (dump_template_argument_list, dump_type, dump_decl,
1941 dump_template_parms): Adjust.
1942 * parser.c (cp_parser_template_argument_list): Always set defaulted
1943 template args count when compiled with --enable-checking.
1945 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
1947 * decl.c (redeclaration_error_message): Wrap the return messages into
1948 G_() for easy translation.
1950 2010-01-28 Jason Merrill <jason@redhat.com>
1953 * semantics.c (begin_class_definition): Don't use type_as_string.
1955 2010-01-28 Dodji Seketeli <dodji@redhat.com>
1959 * typeck.c (get_template_parms_of_dependent_type): Factorized
1960 this out of incompatible_template_type_parms_p
1961 (incompatible_dependent_types_p): Renamed
1962 incompatible_template_type_parms_p into this. Make it detect
1963 two incompatible dependent typedefs too.
1964 (structural_comptypes): Use incompatible_dependent_types_p.
1965 * pt.c (get_template_info):
1966 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
1968 2010-01-20 Janis Johnson <janis187@us.ibm.com>
1969 Jason Merrill <jason@redhat.com>
1971 * mangle.c (write_type): Mangle transparent record as member type.
1972 * semantics.c (begin_class_definition): Recognize decimal classes
1973 and set TYPE_TRANSPARENT_AGGR.
1975 2010-01-20 Jason Merrill <jason@redhat.com>
1978 * mangle.c (write_expression): Handle tree codes that have extra
1979 arguments in the middle-end.
1981 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
1984 * except.c (expand_start_catch_block): Deal correctly with
1985 do_begin_catch returning error_mark_node.
1987 2010-01-20 Jason Merrill <jason@redhat.com>
1990 * class.c (layout_class_type): Set packed_maybe_necessary for packed
1994 * semantics.c (build_lambda_object): Call mark_used on captured
1998 * decl.c (grokdeclarator): Clear type_quals for a member function
1999 declared using a typedef. Don't complain about adding cv-quals
2000 to a function typedef in C++0x mode.
2002 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2004 * decl.c (create_array_type_for_decl): Remove set but not used
2005 variable error_msg. Remove break stmts after return stmts.
2007 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2009 * error.c (dump_template_parms, count_non_default_template_args):
2010 Revert fix of PR c++/42634.
2012 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2015 * error.c (dump_template_parms): Use innermost template
2016 arguments before calling count_non_default_template_args.
2017 (count_non_default_template_args): We are being called with
2018 template innermost arguments now. There is no need to ensure
2021 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2024 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2026 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2029 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2031 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2034 *pt.c (tsubst_decl): Get the arguments of a specialization from
2035 the specialization template, not from the most general template.
2037 2010-01-16 Jason Merrill <jason@redhat.com>
2040 * semantics.c (finish_decltype_type): Within a template, treat
2041 unresolved CALL_EXPR as dependent.
2043 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2045 * error.c (dump_template_parms,count_non_default_template_args):
2046 Revert changes of PR c++/42634.
2048 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2051 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2052 functions with noreturn attribute.
2054 2010-01-14 Jason Merrill <jason@redhat.com>
2057 * call.c (build_new_method_call): Don't free the vec here.
2060 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2062 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2065 * error.c (dump_template_parms): Use innermost template
2066 arguments before calling count_non_default_template_args.
2067 (count_non_default_template_args): We are being called with
2068 template innermost arguments now. There is no need to ensure
2071 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2074 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2075 arguments that were previously deduced.
2077 2010-01-05 Jason Merrill <jason@redhat.com>
2079 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2080 * call.c (build_over_call): Don't complain about it.
2082 2010-01-04 Jason Merrill <jason@redhat.com>
2085 * pt.c (tsubst_decl): Don't apply type attributes in place.
2088 * semantics.c (describable_type): Remove decltype comment and
2093 Copyright (C) 2010 Free Software Foundation, Inc.
2095 Copying and distribution of this file, with or without modification,
2096 are permitted in any medium without royalty provided the copyright
2097 notice and this notice are preserved.