1 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
3 Merge from apple/trunk branch on FSF servers:
5 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
8 * typeck.c (composite_pointer_type): Call objc_have_common_type
9 when comparing two objective-c pointer types.
11 2005-06-22 Ziemowit Laski <zlaski@apple.com>
14 * call.c (standard_conversion): Allow for a pointer conversion
15 between any two ObjC pointer types.
16 * typeck.c (composite_pointer_type): Determine common type
17 for two ObjC pointer types.
19 2010-09-24 Jan Hubicka <jh@suse.cz>
21 * decl.c (finish_function): Use decl_replaceable_p
22 * method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias.
24 2010-09-24 Jason Merrill <jason@redhat.com>
26 * decl.c (compute_array_index_type): Remember type dependence of
28 * pt.c (dependent_type_p_r): Don't recompute it here.
30 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
31 reference and pointer to the same type as "*" or "&".
33 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
35 * typeck.c (warn_args_num): Use warning 'too many arguments to
36 method [methodname]' for an Objective-C method instead of the less
37 satisfactory 'too many arguments to function' (with no method
40 2010-09-21 Jason Merrill <jason@redhat.com>
42 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
43 special handling if we know the member.
45 2010-09-18 Jason Merrill <jason@redhat.com>
47 * call.c (compare_ics): Do lvalue/rvalue reference binding
48 comparison for ck_list, too.
50 2010-09-15 Jason Merrill <jason@redhat.com>
52 * semantics.c (finish_id_expression): Diagnose use of function
53 parms in evaluated context outside function body.
55 * decl2.c (grokbitfield): Diagnose non-integral width.
57 * call.c (convert_like_real): Use the underlying type of the
58 reference for the temporary.
60 2010-09-15 Jakub Jelinek <jakub@redhat.com>
63 * class.c (build_vtbl_initializer): Use fn instead of init's operand
64 as first argument to FDESC_EXPR.
66 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
69 * decl.c (grokdeclarator): Check build_memfn_type return value
72 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
74 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
75 (begin_range_for_stmt): Likewise.
77 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
79 Implement range-based for-statements.
80 * cp-tree.def (RANGE_FOR_STMT): New.
81 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
82 (cp_convert_range_for): Declare.
83 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
84 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
85 * semantics.c (begin_range_for_stmt): New.
86 (finish_range_for_decl): New.
87 (finish_for_stmt): Accept also RANGE_FOR_STMT.
88 (perform_koenig_lookup): Add extra argument include_std.
89 * parser.c (cp_parser_c_for): New with code from
90 cp_parser_iteration_statement().
91 (cp_parser_range_for): New.
92 (cp_convert_range_for): New.
93 (cp_parser_iteration_statement): Add range-for support.
94 (cp_parser_condition): Adjust comment.
95 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
97 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
98 * cxx-pretty-print.c: Likewise.
99 * lex.c (cxx_init): Likewise.
100 * name-lookup.c (lookup_function_nonclass): Add extra argument
102 (lookup_arg_dependent): Likewise.
103 * name-lookup.h: Likewise.
105 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
108 * error.c (maybe_warn_cpp0x): Add new warning
109 CPP0X_INLINE_NAMESPACES.
110 * parser.c (cp_parser_namespace_definition): Likewise.
111 * cp-tree.h (cpp0x_warn_str): Likewise.
113 2010-09-10 Richard Guenther <rguenther@suse.de>
115 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
116 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
118 2010-09-10 Jan Hubicka <jh@suse.cz>
120 PR tree-optimization/45605
121 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
124 2010-09-08 Jakub Jelinek <jakub@redhat.com>
127 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
128 before calling fold_decl_constant_value.
130 2010-09-07 Arnaud Charlet <charlet@adacore.com>
132 * cp-tree.h (build_enumerator): Add new location_t parameter.
133 (build_lang_decl_loc): New function.
134 * decl.c (build_enumerator): New parameter loc. Use it when calling
135 build_decl. Replace build_lang_decl with build_lang_decl_loc.
136 * pt.c (tsubst_enum): Adjust call to build_enumerator.
137 * parser.c (cp_parser_enumerator_definition): Ditto.
138 * lex.c (build_lang_decl_loc): New function.
140 2010-09-06 Dodji Seketeli <dodji@redhat.com>
145 * tree.c (strip_typedefs): Strip typedefs from the context of
148 2010-09-06 Mark Mitchell <mark@codesourcery.com>
150 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
151 * call.c (build_conditional_expr): Likewise.
152 (convert_arg_to_ellipsis): Likewise.
154 2010-09-06 Arnaud Charlet <charlet@adacore.com>
156 * parser.c (make_pointer_declarator, make_reference_declarator,
157 make_call_declarator, make_array_declarator): Set declarator->id_loc.
158 (cp_parser_init_declarator): Adjust location of decl if appropriate.
160 2010-09-06 Jason Merrill <jason@redhat.com>
162 * call.c (implicit_conversion): Fix value-init of enums.
163 (convert_like_real): Likewise.
165 * decl.c (cp_finish_decl): Don't change init for auto deduction.
167 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
168 (fold_non_dependent_expr): ...here.
169 (convert_nontype_argument): Use it. Take complain parm.
170 Use perform_implicit_conversion instead of ocp_convert.
171 Allow cv-qual changes.
172 (convert_template_argument): Pass complain down.
173 (tsubst_template_arg): Suppress constant expression warnings.
176 * method.c (synthesized_method_walk): In constructors, also check
177 subobject destructors.
179 * semantics.c (finish_compound_literal): Always build a
182 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
185 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
187 2010-08-30 Jakub Jelinek <jakub@redhat.com>
190 * parser.c (cp_parser_omp_atomic): Handle boolean
191 {PRE,POST}_INCREMENT.
193 2010-08-29 Jason Merrill <jason@redhat.com>
196 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
197 after tentative parsing.
199 2010-08-22 Joseph Myers <joseph@codesourcery.com>
201 * Make-lang.in (g++spec.o): Update dependencies.
202 * g++spec.c: Include opts.h
203 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
204 (lang_specific_driver): Use cl_decoded_option structures.
206 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
208 * call.c: Use FOR_EACH_VEC_ELT.
213 * except.c: Likewise.
214 * mangle.c: Likewise.
215 * method.c: Likewise.
216 * name-lookup.c: Likewise.
217 * parser.c: Likewise.
220 * semantics.c: Likewise.
221 * typeck2.c: Likewise.
223 2010-08-19 Jason Merrill <jason@redhat.com>
225 * call.c (reference_related_p): Check for error_mark_node.
226 (add_function_candidate): Check it instead of
227 same_type_ignoring_top_level_qualifiers_p.
230 * init.c (build_new_1): Don't use build_value_init in a template.
231 (build_value_init): Make sure we don't.
234 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
235 of empty class CONSTRUCTOR.
237 * except.c (pending_noexcept, pending_noexcept_checks): New.
238 (perform_deferred_noexcept_checks): New.
239 (maybe_noexcept_warning): Split from...
240 (finish_noexcept_expr): ...here. Adjust.
241 * decl2.c (cp_write_global_declarations): Call
242 perform_deferred_noexcept_checks.
243 * cp-tree.h: And declare it.
245 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
248 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
251 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
253 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
254 or if -fms-extensions is enabled check, check permissive.
256 2010-08-09 Jason Merrill <jason@redhat.com>
259 * pt.c (lookup_template_class): Don't re-coerce outer parms.
261 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
263 * call.c (add_builtin_candidates): Use VECs for local variable
264 `types'. Adjust remainder of function accordingly.
266 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
268 * name-lookup.c (is_associated_namespace): Convert local variables
269 to be VECs instead of TREE_LISTs.
271 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
273 * tree.c (varargs_function_p): Use stdarg_p.
275 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
277 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
278 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
279 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
280 Change type to a VEC.
281 (unparsed_funs_with_default_args): Define.
282 (unparsed_funs_with_definitions): Define.
283 (push_unparsed_function_queues): New function.
284 (cp_parser_new): Call it.
285 (pop_unparsed_function_queues): New function.
286 (cp_parser_class_specifier): Adjust processing of unparsed functions.
287 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
288 (cp_parser_save_member_function_body): Likewise.
289 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
290 and pop_unparsed_function_queues.
291 (cp_parser_late_parsing_default_args): Likewise.
292 (cp_parser_save_default_args): Use VEC_safe_push.
294 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
296 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
298 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
300 * decl.c (poplevel): Adjust for type changes.
301 (declare_local_label): Likewise.
303 2010-08-06 Jason Merrill <jason@redhat.com>
305 * typeck.c (complete_type_or_maybe_complain): Split out from...
306 (complete_type_or_else): Here.
307 (build_class_member_access_expr): Call it.
308 (finish_class_member_access_expr): Likewise.
309 * call.c (build_special_member_call): Likewise.
310 * cvt.c (build_expr_type_conversion): Likewise.
311 * init.c (build_new): Likewise.
312 * typeck2.c (build_functional_cast): Likewise.
313 * cp-tree.h: Declare it.
315 * init.c (build_value_init): Add complain parm.
316 (build_value_init_noctor): Likewise.
317 (perform_member_init): Pass it.
318 (expand_aggr_init_1): Likewise.
319 (build_new_1): Likewise.
320 (build_vec_init): Likewise.
321 * pt.c (tsubst_expr): Likewise.
322 * typeck2.c (build_functional_cast): Likewise.
324 * tree.c (build_target_expr_with_type): Handle error_mark_node.
326 * typeck.c (decay_conversion): Any expression with type nullptr_t
329 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
332 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
334 2010-07-27 Jason Merrill <jason@redhat.com>
336 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
337 from build_value_init.
338 * init.c (build_value_init_noctor): Give error for unknown array
341 2010-07-27 Joseph Myers <joseph@codesourcery.com>
343 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
345 2010-07-27 Joseph Myers <joseph@codesourcery.com>
347 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
348 c_common_initialize_diagnostics.
349 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
350 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
352 2010-07-21 Jason Merrill <jason@redhat.com>
354 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
356 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
359 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
362 * pt.c (instantiate_class_template): Propagate the template's
363 location to its instance.
365 2010-07-20 Jason Merrill <jason@redhat.com>
368 * pt.c (tsubst_copy_and_build): Rework last change.
371 * pt.c (tsubst_copy_and_build): Handle partial substitution of
374 2010-07-19 Jason Merrill <jason@redhat.com>
377 * semantics.c (finish_decltype_type): Correct decltype
378 of parenthesized rvalue reference variable.
381 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
382 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
384 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
387 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
389 * cp-tree.h: Adjust declaration.
390 * init.c (perform_member_init): Adjust caller.
391 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
392 * typeck2.c (store_init_value): Likewise.
393 (build_functional_cast): Pass complain argument to
394 build_x_compound_expr_from_list.
396 2010-07-16 Jason Merrill <jason@redhat.com>
399 * pt.c (process_partial_specialization): Diagnose partial
400 specialization after instantiation.
401 (most_specialized_class): Add complain parm.
403 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
405 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
407 * init.c (build_new_1): Use cp_build_function_call_nary instead of
408 cp_build_function_call.
410 2010-07-15 Jason Merrill <jason@redhat.com>
413 * call.c (add_function_candidate): If we're working on an implicit
414 declaration, don't consider candidates that won't match.
415 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
416 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
419 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
420 (TYPE_HAS_USER_OPEQ): New.
421 * decl.c (grok_special_member_properties): Set it.
422 * class.c (add_implicitly_declared_members): Don't lazily declare
423 constructors/operator= if a base or member has a user-declared one.
424 (check_bases_and_members, check_bases): Adjust.
425 (check_field_decls, check_field_decl): Adjust.
427 2010-07-15 Anatoly Sokolov <aesok@post.ru>
429 * decl.c (integer_three_node): Remove.
430 (cxx_init_decl_processing): Do not initialize the integer_three_node.
431 * cp-tree.h (integer_three_node): Remove.
433 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
435 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
438 * cp-gimplify.c: Likewise.
442 * mangle.c: Likewise.
443 * name-lookup.c: Likewise.
444 * optimize.c: Likewise.
445 * parser.c: Likewise.
448 * search.c: Likewise.
449 * semantics.c: Likewise.
450 * typeck.c: Likewise.
451 * typeck2.c: Likewise.
453 2010-07-14 Jason Merrill <jason@redhat.com>
455 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
456 (build_field_list): Cache field type.
458 Implement C++0x unrestricted unions (N2544)
459 * class.c (check_field_decl): Loosen union handling in C++0x.
460 * method.c (walk_field_subobs): Split out from...
461 (synthesized_method_walk): ...here. Set msg before loops.
462 (process_subob_fn): Check for triviality in union members.
463 * init.c (sort_mem_initializers): Splice out uninitialized
464 anonymous unions and union members.
465 (push_base_cleanups): Don't automatically destroy anonymous unions
468 2010-07-13 Jason Merrill <jason@redhat.com>
471 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
472 (TYPE_HAS_USER_OPEQ): New.
473 * decl.c (grok_special_member_properties): Set it.
474 * class.c (add_implicitly_declared_members): Don't lazily declare
475 constructors/operator= if a base or member has a user-declared one.
476 (check_bases_and_members, check_bases): Adjust.
477 (check_field_decls, check_field_decl): Adjust.
478 * method.c (synthesized_method_walk): Initialize check_vdtor.
481 * mangle.c (write_type): Canonicalize.
482 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
483 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
485 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
488 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
490 * typeck.c (get_delta_difference): Update prototype, add a
491 tsubst_flags_t parameter; update get_delta_difference_1 calls and
492 add checks for error_mark_node.
493 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
494 parameter; update lookup_base call.
495 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
496 parameter; update get_delta_difference call and add check for
498 (convert_ptrmem): Update prototype, add a tsubst_flags_t
499 parameter; update get_delta_difference call and add check for
500 error_mark_node; update build_ptrmemfunc call.
501 (build_static_cast_1): Adjust convert_ptrmem call.
502 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
503 (cp_build_unary_op): Adjust build_ptrmemfunc call.
504 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
505 and build_ptrmemfunc calls.
506 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
508 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
511 * call.c (build_temp): Add tsubst_flags_t complain parameter;
512 adjust build_special_member_call call, pass complain.
513 (convert_like_real): Adjust build_temp call, pass complain.
515 2010-07-09 Jason Merrill <jason@redhat.com>
518 * cp-tree.h (BV_LOST_PRIMARY): New macro.
519 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
521 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
523 2010-07-08 Jason Merrill <jason@redhat.com>
526 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
527 virtual bases for covariant thunks.
529 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
531 * cp-tree.h: Do not include toplev.h.
533 2010-07-06 Jason Merrill <jason@redhat.com>
536 * call.c (is_std_init_list): Look through typedefs.
539 * init.c (build_offset_ref): If scope isn't dependent,
540 don't exit early. Look at TYPE_MAIN_VARIANT.
541 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
543 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
545 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
547 * cp-tree.h (impl_conv_void): New type.
548 (convert_to_void): Adjust prototype.
549 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
550 diagnostic for easy translation. Change caller.
551 * typeck.c: Update call to convert_to_void.
552 * semantics.c: Likewise.
555 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
557 * decl.c (cp_finish_decl): Call add_local_decl.
558 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
560 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
562 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
565 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
568 * parser.c (cp_parser_primary_expression): Error if local template is
571 2010-07-02 Le-Chun Wu <lcwu@google.com>
574 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
575 (variable or type) shadows another type.
577 2010-07-02 Jakub Jelinek <jakub@redhat.com>
580 * typeck.c (convert_for_assignment): When converting a convertible
581 vector type or objc++ types, call mark_rvalue_use.
582 * typeck2.c (build_m_component_ref): Use return values from
583 mark_rvalue_use or mark_lvalue_use.
584 * class.c (build_base_path): Likewise.
585 * call.c (build_conditional_expr): Likewise.
587 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
590 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
593 2010-07-01 Richard Guenther <rguenther@suse.de>
595 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
596 predicate we are looking for, allow non-gimplified
599 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
602 * typeck.c (cp_build_unary_op): Early return error_mark_node when
603 arg is NULL_TREE too.
604 * call.c (convert_class_to_reference): Return error_mark_node when
607 2010-06-30 Michael Matz <matz@suse.de>
609 * repo.c (finish_repo): Fix typo.
611 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
613 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
615 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
617 * repo.c (pending_repo): Change type to a VEC.
618 (finish_repo): Adjust for new type of pending_repo.
619 (repo_emit_p): Likewise.
621 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
623 * tree.c: Include gimple.h. Do not include tree-flow.h
624 * decl.c: Do not include tree-flow.h
625 * Make-lang.in: Adjust dependencies.
627 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
629 * decl.c (incomplete_var): Declare. Declare VECs containing them.
630 (incomplete_vars): Adjust comment. Change type to a VEC.
631 (maybe_register_incomplete_var): Adjust for new type.
632 (complete_vars): Adjust iteration over incomplete_vars.
634 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
636 * decl.c (struct named_label_entry): Change type of bad_decls field
638 (poplevel_named_label_1): Adjust for new type of bad_decls.
639 (check_goto): Likewise.
641 2010-06-29 Jason Merrill <jason@redhat.com>
643 Enable implicitly declared move constructor/operator= (N3053).
644 * class.c (add_implicitly_declared_members): A class with no
645 explicitly declared copy or move constructor gets both declared
646 implicitly, and similarly for operator=.
647 (check_bases): A type with no copy ctor does not inhibit
648 a const copy ctor in a derived class. It does mean the derived
650 (check_field_decl): Likewise.
651 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
652 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
653 (trivially_copyable_p): Likewise.
654 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
655 * class.c (finish_struct_bits): Likewise.
656 * tree.c (build_target_expr_with_type): Likewise.
657 * typeck2.c (store_init_value): Likewise.
659 Enable implicitly deleted functions (N2346)
660 * class.c (check_bases_and_members): Adjust lambda flags.
661 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
663 * decl2.c (mark_used): Adjust error for use of deleted function.
665 Machinery to support implicit delete/move.
666 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
667 has_complex_move_ctor, has_complex_move_assign bitfields.
668 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
669 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
670 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
671 (enum special_function_kind): Add sfk_move_assignment.
672 (LOOKUP_SPECULATIVE): New.
673 * call.c (build_over_call): Return early if it's set.
674 (build_over_call): Use trivial_fn_p.
675 * class.c (check_bases): If the base has no default constructor,
676 the derived one is non-trivial. Handle move ctor/op=.
677 (check_field_decl): Likewise.
678 (check_bases_and_members): Handle move ctor/op=.
679 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
680 (type_has_move_constructor, type_has_move_assign): New.
681 * decl.c (grok_special_member_properties): Handle move ctor/op=.
682 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
684 (do_build_copy_constructor): Use it.
685 (do_build_assign_ref): Likewise. Handle move assignment.
686 (build_stub_type, build_stub_object, locate_fn_flags): New.
687 (locate_ctor): Use locate_fn_flags.
688 (locate_copy, locate_dtor): Remove.
689 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
690 (process_subob_fn, synthesized_method_walk): New.
691 (maybe_explain_implicit_delete): New.
692 (implicitly_declare_fn): Use synthesized_method_walk,
693 type_has_trivial_fn, and type_set_nontrivial_flag.
694 (defaulted_late_check): Set DECL_DELETED_FN.
695 (defaultable_fn_check): Handle sfk_move_assignment.
696 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
697 implicitly deleted move ctor/op=.
698 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
699 (lookup_fnfields_slot): New.
700 * semantics.c (omp_clause_info_fndecl): Remove.
701 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
702 get_copy_assign, trivial_fn_p.
703 (trait_expr_value): Adjust call to locate_ctor.
704 * tree.c (special_function_p): Handle sfk_move_assignment.
706 * class.c (type_has_virtual_destructor): New.
707 * cp-tree.h: Declare it.
708 * semantics.c (trait_expr_value): Use it.
710 * call.c (build_over_call): Only give warnings with tf_warning.
712 * name-lookup.c (pop_scope): Handle NULL_TREE.
714 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
715 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
716 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
717 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
718 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
719 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
720 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
721 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
722 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
723 (sfk_assignment_operator): Rename to sfk_copy_assignment.
724 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
725 * search.c, semantics.c, tree.c: Adjust.
727 * pt.c (dependent_scope_ref_p): Remove.
728 (value_dependent_expression_p): Don't call it.
729 (type_dependent_expression_p): Here either.
730 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
731 if the scope isn't dependent.
733 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
737 * pt.c (has_value_dependent_address): New.
738 (value_dependent_expression_p): Check it.
739 (convert_nontype_argument): Likewise. Call decay_conversion before
740 folding if we want a pointer.
741 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
742 scope is the current instantiation.
744 2010-06-28 Jakub Jelinek <jakub@redhat.com>
747 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
750 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
752 * init.c: Do not include except.h.
755 * cp-lang.c: Likewise.
757 * semantics.c: Likewise.
759 * except.c: Likewise.
760 (init_exception_processing): Do not set the removed
761 lang_protect_cleanup_actions here.
762 (cp_protect_cleanup_actions): Make non-static and remove prototype.
763 (doing_eh): New, moved from except.c but removed the do_warning flag.
764 (expand_start_catch_block): Update doing_eh call.
765 (expand_end_catch_block): Likewise.
766 (build_throw): Likewise.
767 * cp-tree.h: Prototype cp_protect_cleanup_actions.
768 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
769 cp_protect_cleanup_actions.
770 * Make-lang.in: Update dependencies.
772 2010-06-26 Jason Merrill <jason@redhat.com>
774 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
775 constructor called with a single argument that takes a reference
776 to the constructor's class.
777 (BAD_CONVERSION_RANK): New.
778 (compare_ics): Use it to compare bad ICSes.
780 2010-06-25 Joseph Myers <joseph@codesourcery.com>
782 * lang-specs.h: Remove +e handling.
784 2010-06-24 Andi Kleen <ak@linux.intel.com>
786 * parser.c: (cp_parser_question_colon_clause):
787 Switch to use cp_lexer_peek_token.
788 Call warn_for_omitted_condop. Call pedwarn for omitted
791 2010-06-22 Jakub Jelinek <jakub@redhat.com>
794 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
795 datum and mark_rvalue_use on component.
798 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
799 the CALL_EXPR has no arguments.
801 2010-06-21 Jason Merrill <jason@redhat.com>
803 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
805 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
808 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
810 * name-lookup.c (struct arg_lookup): Convert namespaces and
811 classes fields to VEC.
812 (arg_assoc_namespace): Adjust for new type of namespaces.
813 (arg_assoc_class): Adjust for new type of classes.
814 (lookup_arg_dependent): Use make_tree_vector and
816 * typeck2.c (build_x_arrow): Use vec_member.
818 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
821 * error.c (dump_decl): Better wording for anonymous namespace.
823 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
825 * class.c (build_vtbl_initializer): Adjust computation of new_position
826 and which entry to add padding for.
828 2010-06-16 Jason Merrill <jason@redhat.com>
830 * except.c (check_noexcept_r): Return the problematic function.
831 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
832 * pt.c (tsubst_copy_and_build): Pass it.
833 * parser.c (cp_parser_unary_expression): Likewise.
834 * cp-tree.h: Adjust prototype.
836 * method.c (defaulted_late_check): Give the defaulted method
837 the same exception specification as the implicit declaration.
839 2010-06-15 Jason Merrill <jason@redhat.com>
841 * class.c (add_implicitly_declared_members): Implicit assignment
842 operators can also be virtual overriders.
843 * method.c (lazily_declare_fn): Likewise.
845 * call.c (convert_like_real): Give "initializing argument of"
846 information for ambiguous conversion. Give source position
849 * call.c (print_z_candidates): Do print viable deleted candidates.
850 (joust): Don't choose a deleted function just because its worst
851 conversion is better than another candidate's worst.
853 * call.c (convert_like_real): Don't complain about
854 list-value-initialization from an explicit constructor.
856 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
857 DECL_SOURCE_LOCATION directly.
859 * class.c (type_has_user_provided_default_constructor): Use
862 * call.c (is_subseq): Handle ck_aggr, ck_list.
863 (compare_ics): Treat an aggregate or ambiguous conversion to the
864 same type as involving the same function.
866 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
868 * typeck.c (convert_for_assignment): Fix comment. Change message
869 format from %d to %qP.
870 (convert_for_initialization): Fix comment.
872 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
874 * cp-tree.h (expr_list_kind): New type.
875 (impl_conv_rhs): New type.
876 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
878 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
879 diagnostics for easy translation. Change caller.
880 (convert_for_initialization): Use impl_conv_rhs and change caller.
881 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
882 diagnostics for easy translation. Change caller.
883 * decl.c (bad_spec_place): New enum.
884 (bad_specifiers): Use it and emit the diagnostics for easy
885 translation. Change caller.
886 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
888 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
890 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
892 * decl2.c (cp_write_global_declarations): Adjust for new type of
894 * name-lookup.c (current_decl_namespace): Likewise.
895 (push_decl_namespace): Likewise.
896 (pop_decl_namespace): Likewise.
898 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
900 * call.c (build_java_interface_fn_ref): Call build_function_type_list
901 instead of build_function_type.
902 * decl.c (cxx_init_decl_processing): Likewise.
903 (declare_global_var): Likewise.
904 (get_atexit_node): Likewise.
905 (expand_static_init): Likewise.
906 * decl2.c (start_objects): Likewise.
907 (start_static_storage_duration_function): Likewise.
908 * except.c (init_exception_processing): Likewise.
909 (build_exc_ptr): Likewise.
910 (build_throw): Likewise.
911 * rtti.c (throw_bad_cast): Likewise.
912 (throw_bad_typeid): Likewise.
913 (build_dynamic_cast_1): Likewise.
915 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
917 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
918 (build_op_delete_call): Likewise.
919 (build_over_call): Likewise.
920 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
921 * pt.c (process_partial_specialization): Likewise.
922 (tsubst_template_args): Likewise.
923 * semantics.c (finish_asm_stmt): Likewise.
925 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
927 * decl.c (record_key_method_defined): New, broken out of ...
928 (finish_function): ... here. Call it.
929 (start_decl): Treat aliases as definitions.
931 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
933 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
935 * pt.c (maybe_process_partial_specialization): Likewise.
936 (register_specialization): Likewise.
937 (add_pending_template): Likewise.
938 (lookup_template_class): Likewise.
939 (push_tinst_level): Likewise.
941 * parser.c (cp_lexer_new_main): Likewise.
942 (cp_lexer_new_from_tokens): Likewise.
943 (cp_token_cache_new): Likewise.
944 (cp_parser_context_new): Likewise.
945 (cp_parser_new): Likewise.
946 (cp_parser_nested_name_specifier_opt): Likewise.
947 (cp_parser_template_id): Likewise.
949 * name-lookup.c (binding_entry_make): Likewise.
950 (binding_table_construct): Likewise.
951 (binding_table_new): Likewise.
952 (cxx_binding_make): Likewise.
953 (pushdecl_maybe_friend): Likewise.
954 (begin_scope): Likewise.
955 (push_to_top_level): Likewise.
957 * lex.c (init_reswords): Likewise.
958 (retrofit_lang_decl): Likewise.
959 (cxx_dup_lang_specific_decl): Likewise.
960 (copy_lang_type): Likewise.
961 (cxx_make_type): Likewise.
963 * decl.c (make_label_decl): Likewise.
964 (check_goto): Likewise.
965 (start_preparsed_function): Likewise.
966 (save_function_data): Likewise.
968 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
970 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
972 * class.c (finish_struct_1): Likewise.
974 * cp-tree.h (struct lang_type): Add variable_size GTY option.
975 (struct lang_decl): Likewise.
977 * parser.c (cp_parser_new): Update comment to not reference
980 2010-06-07 Jason Merrill <jason@redhat.com>
983 * error.c (dump_parameters): Mask out TFF_SCOPE.
984 (dump_simple_decl): Don't print the scope of a PARM_DECL.
985 (dump_scope): Remove no-op mask.
988 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
990 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
991 * init.c (build_offset_ref): Use it.
992 * pt.c (maybe_process_partial_specialization): Use it.
993 (instantiate_class_template): Use it.
994 * search.c (lookup_base): Use it.
996 2010-06-07 Jakub Jelinek <jakub@redhat.com>
999 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1000 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1001 handled_component_p.
1004 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1005 set also DECL_READ_P on the decl.
1007 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1010 * cp-tree.h (typedef_variant_p): Move this declaration to
1012 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1013 * decl.c (grokdeclarator): Do not rename debug info of an
1014 anonymous tagged type named by a typedef.
1016 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1019 * class.c (check_field_decls): Move the call to
1020 check_bitfield_decl before trying to set the
1021 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1023 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1025 * typeck.c: Update include path for moved files.
1028 * cp-gimplify.c: Likewise.
1029 * cp-lang.c: Likewise.
1031 * semantics.c: Likewise.
1032 * cxx-pretty-print.h: Likewise.
1033 * decl2.c: Likewise.
1034 * parser.c: Likewise.
1035 * cp-objcp-common.c: Likewise.
1036 * cp-tree.h: Likewise.
1037 * name-lookup.c: Likewise.
1039 * name-lookup.h: Likewise.
1040 * config-lang.in: Update paths in gtfiles for files in c-family/.
1041 * Make-lang.in: Likewise.
1043 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1045 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1046 * typeck.c (build_ptrmemfunc): Likewise.
1048 2010-06-04 Jason Merrill <jason@redhat.com>
1050 * typeck2.c (merge_exception_specifiers): Adjust merging of
1051 throw() and noexcept(true).
1053 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1054 using an uninitialized variable.
1056 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1057 (pp_cxx_expression): Likewise.
1059 Implement noexcept-specification (15.4)
1060 * parser.c (cp_parser_exception_specification_opt): Parse it.
1061 Give -Wdeprecated warning about throw() specs.
1062 * pt.c (tsubst_exception_specification): Handle it.
1063 * error.c (dump_exception_spec): Handle it.
1064 (dump_expr): Handle NOEXCEPT_EXPR.
1065 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1066 * typeck.c (comp_except_specs): Handle compatibility rules.
1067 Change exact parm to take an enum.
1068 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1069 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1070 (type_throw_all_p, build_noexcept_spec): New fns.
1071 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1072 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1073 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1074 (noexcept_true_spec, noexcept_false_spec): New macros.
1075 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1076 * search.c (check_final_overrider): Adjust.
1077 * decl.c (check_redeclaration_exception_specification): Adjust.
1078 (use_eh_spec_block): Use type_throw_all_p.
1079 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1080 Give operator new a noexcept-specification in C++0x mode.
1081 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1082 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1084 Implement noexcept operator (5.3.7)
1085 * cp-tree.def (NOEXCEPT_EXPR): New.
1086 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1087 * cp-tree.h: Declare finish_noexcept_expr.
1088 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1089 * pt.c (tsubst_copy_and_build): And tsubst it.
1090 (type_dependent_expression_p): Handle it.
1091 (value_dependent_expression_p): Handle it.
1093 * call.c (build_conditional_expr): Never fold in unevaluated context.
1094 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1095 * semantics.c (simplify_aggr_init_expr): Likewise.
1096 * typeck.c (merge_types): Call merge_exception_specifiers.
1097 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1098 DECL_ANTICIPATED for preferring new type.
1100 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1102 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1105 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1108 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1109 on object for static data members.
1111 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1112 Jason Merrill <jason@redhat.com>
1115 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1116 with the same type, call mark_lvalue_use on both.
1118 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1120 * class.c (struct vtbl_init_data_s): Remove last_init field.
1121 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1123 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1125 (build_vtt): Likewise.
1126 (initialize_vtable): Take a VEC instead of a tree.
1127 (build_vtt_inits): Change return type to void. Take a VEC **
1128 instead of a tree *; accumulate results into said VEC.
1129 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1130 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1131 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1133 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1134 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1136 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1137 rather than tree_cons.
1138 (build_vbase_offset_vtbl_entries): Likewise.
1139 (add_vcall_offset): Likewise.
1140 (build_rtti_vtbl_entries): Likewise.
1141 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1142 * decl.c (initialize_artificial_var): Use build_constructor instead
1143 of build_constructor_from_list.
1145 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1148 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1151 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1153 * parser.c (cp_parser_mem_initializer_list): Change error text.
1155 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1157 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1158 tree_decl_map hashtab from tree_map.
1159 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1160 (init_shadowed_var_for_decl): Adjust initialization.
1163 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1164 instead of calling mark_exp_read only when not an assignment.
1167 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1168 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1169 Set DECL_VALUE_EXPR on var.
1171 2010-06-02 Jason Merrill <jason@redhat.com>
1173 * error.c (dump_type): Improve typedef handling.
1178 * name-lookup.c (same_entity_p): New.
1179 (ambiguous_decl): Multiple declarations of the same entity
1182 2010-06-01 Jason Merrill <jason@redhat.com>
1185 * call.c (add_list_candidates): Prefer the default constructor.
1186 (build_aggr_conv): Treat missing initializers like { }.
1187 * typeck2.c (process_init_constructor_record): Likewise.
1188 * init.c (expand_default_init): Use digest_init for
1189 direct aggregate initialization, too.
1191 * call.c (add_list_candidates): Split out...
1192 (build_user_type_conversion_1): ...from here.
1193 (build_new_method_call): And here.
1194 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1197 * call.c (build_list_conv): Set list-initialization flags properly.
1199 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1201 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1203 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1204 Matthew Gingell <gingell@adacore.com>
1206 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1207 * decl2.c: Include langhooks.h and c-ada-spec.h.
1208 (cpp_check, collect_source_refs, collect_ada_namespace,
1209 collect_all_refs): New functions.
1210 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1211 * lang-specs.h: Ditto.
1213 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1215 * cp-tree.h (cp_build_function_call_nary): Declare.
1216 * typeck.c (cp_build_function_call_nary): Define.
1217 * decl.c (register_dtor_fn): Use it instead of
1218 cp_build_function_call.
1219 (cxx_maybe_build_cleanup): Likewise.
1220 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1221 * except.c (do_get_exception_ptr): Likewise.
1222 (do_begin_catch): Likewise.
1223 (do_allocate_exception): Likewise.
1224 (do_free_exception): Likewise.
1225 (build_throw): Likewise. Use cp_build_function_call_vec instead
1226 of cp_build_function_call.
1227 (do_end_catch): Likewise.
1229 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1231 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1232 (struct cp_declarator): Move id_loc field up.
1234 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1236 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1237 this file is included before c-common.h. Define GCC_DIAG_STYLE
1238 before including diagnostic-core.h and toplev.h.
1239 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1240 * pt.c: Include cp-tree.h before c-common.h.
1242 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1244 * tree.c (c_register_addr_space): Add stub.
1246 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1248 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1251 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1253 Revert fix of PR c++/44188
1254 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1256 * tree.c (typedef_variant_p): Revert moving this definition to
1258 * decl.c (grokdeclarator): Revert naming typedef handling.
1260 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1262 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1263 * cp-lang.c: Don't include diagnostic.h
1264 * name-lookup.c: Include diagnostic-core.h instead of
1266 (cp_emit_debug_info_for_using): Use seen_error.
1267 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1268 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1269 * pt.c (iterative_hash_template_arg): Use seen_error.
1270 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1271 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1272 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1273 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1276 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1279 * cp-tree.h (typedef_variant_p): Move this declaration to
1281 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1282 * decl.c (grokdeclarator): Do not rename debug info of an
1283 anonymous tagged type named by a typedef.
1285 2010-05-27 Jason Merrill <jason@redhat.com>
1288 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1291 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1294 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1295 * class.c (layout_class_type): Likewise.
1296 * decl.c (finish_enum): Likewise.
1297 * mangle.c (write_builitin_type): Likewise.
1299 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1301 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1303 * decl.c (grokdeclarator): Handle __int128.
1304 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1305 (cp_parser_simple_type_specifier): Likewise.
1306 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1307 * typeck.c (cp_common_type): Handle __int128.
1308 * mangle.c (integer_type_codes): Add itk_int128 and
1309 itk_unsigned_int128.
1311 2010-05-26 Jason Merrill <jason@redhat.com>
1314 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1317 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1319 * cp-lang.c: Do not include expr.h.
1321 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1323 * decl.c: Do not include rtl.h
1324 * semantics.c: Likewise.
1326 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1328 * cp-tree.h: Do not include splay-tree.h.
1329 (struct prtmem_cst): Remove unused field and false comment.
1330 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1331 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1332 * init.c: Do not include rtl.h and expr.h.
1333 * class.c: Do not include rtl.h. Include splay-tree.h.
1334 (build_clone): Use plain NULL instead of NULL_RTX.
1335 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1336 included. Include splay-tree.h.
1337 * method.c: Do not include rtl.h and expr.h.
1338 (use_thunk): Use plain NULL instead of NULL_RTX.
1339 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1340 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1341 and target.h. Include splay-tree.h.
1342 * expr.c: Do not include rtl.h and expr.h.
1343 * pt.c: Do not include obstack.h and rtl.h.
1344 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1345 (tsubst_decl): Likewise.
1346 (instantiate_decl): Likewise.
1347 * semantics.c: Do not include exprt.h and debug.h. Explain why
1348 rtl.h has to be included.
1349 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1350 * call.c: Do not include rtl.h and expr.h.
1351 * search.c: Do not include obstack.h and rtl.h.
1352 * friend.c: Do not include rtl.h and expr.h.
1353 * Make-lang.in: Update dependencies.
1355 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1358 * parser.c (non_integral_constant): Add NIC_NONE.
1359 (required_token): Add RT_NONE.
1360 (cp_parser_unary_expression): Initialize non_constant_p
1362 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1363 (cp_parser_primary_expression, cp_parser_postfix_expression,
1364 cp_parser_cast_expression, cp_parser_binary_expression,
1365 cp_parser_functional_cast): Fix formatting.
1367 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1370 * parser.c: Remove inclusion of dyn-string.h.
1371 (non_integral_constant): New enum.
1372 (name_lookup_error): New enum.
1373 (required_token): New enum.
1374 (cp_parser_required_error): New function.
1375 (cp_parser_require): Change the type of variable token_desc to
1376 required_token and use cp_parser_required_error.
1377 (cp_parser_require_keyword): Likewise.
1378 (cp_parser_error): Use gmsgid as parameter.
1379 (cp_parser_name_lookup_error): Change the type of variable desired to
1380 name_lookup_error and put the diagnostic in the full sentences. Change
1382 (cp_parser_non_integral_constant_expression): Change the type of the
1383 variable thing to non_integral_constant and put the diagnostics in
1384 full sentences. Change caller.
1386 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1389 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1391 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1393 * error.c (cp_diagnostic_starter): Update call to
1394 diagnostic_build_prefix.
1395 (cp_print_error_function,
1396 print_instantiation_partial_context_line): Check show_column flag
1399 2010-05-24 Jason Merrill <jason@redhat.com>
1402 * decl.c (check_initializer): Don't wrap an init-list in a
1404 * init.c (build_aggr_init): Don't assume copy-initialization if
1405 init has CONSTRUCTOR_IS_DIRECT_INIT.
1406 * call.c (build_new_method_call): Sanity check.
1408 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1410 * rtti.c (tinfo_base_init): Use build_constructor instead of
1411 build_constructor_from_list. Don't cons a tree node for
1413 (generic_initializer): Use build_constructor_single instead of
1414 build_constructor_from_list.
1415 (ptr_initializer): Use build_constructor instead of
1416 build_constructor_from_list
1417 (ptm_initializer): Likewise.
1418 (class_initializer): Likewise. Take varargs instead of TRAIL.
1419 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1420 build_constructor instead of build_constructor_from_list.
1422 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1424 * semantics.c: Include bitmap.h.
1425 * Make-lang.in: Update dependencies.
1427 2010-05-22 Jan Hubicka <jh@suse.cz>
1429 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1431 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1433 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1435 * cxx-pretty-print.c: Correct merge error.
1437 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1439 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1440 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1441 (cp_printer): Handle %K here using percent_K_format.
1442 * cxx-pretty-print.c: Include tree-pretty-print.h.
1443 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1446 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1448 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
1449 Clean up redundant includes.
1451 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1454 * decl.c (xref_basetypes): Return false in case of ill-formed
1457 2010-05-19 Jason Merrill <jason@redhat.com>
1459 * call.c (reference_binding): Use cp_build_qualified_type_real
1460 and cp_type_quals consistently.
1461 (add_function_candidate): Likewise.
1462 (build_conditional_expr): Likewise.
1463 (convert_like_real): Likewise.
1464 (type_passed_as): Likewise.
1465 * class.c (add_method): Likewise.
1466 (same_signature_p): Likewise.
1467 (layout_class_type): Likewise.
1468 * decl.c (cxx_init_decl_processing): Likewise.
1469 (cp_fname_init): Likewise.
1470 (grokdeclarator): Likewise.
1471 * decl2.c (cp_reconstruct_complex_type): Likewise.
1472 * init.c (build_new_1): Likewise.
1473 * method.c (do_build_copy_constructor): Likewise.
1474 (implicitly_declare_fn): Likewise.
1475 * pt.c (tsubst_aggr_type): Likewise.
1477 * rtti.c (init_rtti_processing): Likewise.
1478 (build_headof): Likewise.
1479 (build_dynamic_cast_1): Likewise.
1480 (tinfo_base_init): Likewise.
1481 (emit_support_tinfos): Likewise.
1482 * semantics.c (capture_decltype): Likewise.
1483 * tree.c (cv_unqualified): Likewise.
1484 * typeck.c (composite_pointer_type): Likewise.
1485 (string_conv_p): Likewise.
1487 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1489 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1490 * decl.c (start_decl): Likewise.
1491 * semantics.c (finish_compound_literal): Likewise.
1492 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1493 (cp_type_readonly): Remove.
1494 * cp-tree.h: Remove declaration.
1496 * typeck.c (merge_types): Preserve memfn quals.
1498 * decl.c (grokdeclarator): Don't check quals on fn type.
1499 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1500 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1503 * typeck.c (type_memfn_quals): New fn.
1504 (apply_memfn_quals): New fn.
1505 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1506 (cp_type_readonly): Use cp_type_quals.
1507 * cp-tree.h: Add declarations.
1508 * tree.c (cp_build_qualified_type_real): Don't set, but do
1509 preserve, quals on FUNCTION_TYPE.
1510 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1511 * decl.c (build_ptrmem_type): Likewise.
1512 (grokdeclarator): Likewise.
1513 (static_fn_type): Likewise.
1514 * decl2.c (change_return_type): Likewise.
1515 (cp_reconstruct_complex_type): Likewise.
1516 * pt.c (tsubst_function_type): Likewise.
1518 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1520 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1522 * tree.c (build_min_non_dep_call_vec): Update comment.
1524 2010-05-17 Jason Merrill <jason@redhat.com>
1526 * call.c (struct z_candidate): Add explicit_targs field.
1527 (add_template_candidate_real): Set it.
1528 (build_over_call): Use it to control init-list warning.
1531 * call.c (build_over_call): Limit init-list deduction warning to
1532 cases where the argument is actually an init-list.
1535 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1537 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1538 Jason Merrill <jason@redhat.com>
1541 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1543 2010-05-15 Jason Merrill <jason@redhat.com>
1545 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1546 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1548 (finish_eh_spec_block): Adjust.
1550 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1553 * pt.c (tsubst): Unshare template argument.
1555 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1557 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1558 * Make-lang.in: Fix dependencies accordingly.
1560 2010-05-14 Jason Merrill <jason@redhat.com>
1563 * except.c (build_throw): Simplify, adjust for DR 475.
1566 * except.c (dtor_nothrow): Return nonzero for type with
1570 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1571 gimple_build_eh_must_not_throw.
1573 2010-05-14 Martin Jambor <mjambor@suse.cz>
1575 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1578 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1580 * call.c (build_new_method_call): Change warning text.
1581 * typeck2.c (build_functional_cast): Change error text.
1583 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1586 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1587 shadowing the outer parameter or variables by the declaration of
1588 nested function in nested structure or class. Warn the shadowing by
1589 the declaration of nested lambda expression.
1591 2010-05-13 Jason Merrill <jason@redhat.com>
1593 * typeck.c (cp_build_array_ref): Factor out from...
1594 (build_array_ref): ...here. Drop complain parm.
1595 (build_new_op): Adjust.
1596 * class.c (build_vtbl_ref_1): Adjust.
1597 * decl2.c (grok_array_decl): Adjust.
1598 * cp-tree.h: Adjust prototypes.
1600 2010-05-13 Jan Hubicka <jh@suse.cz>
1602 * decl.c (cp_finish_decl): Do not worry about used attribute.
1604 2010-05-12 Jason Merrill <jason@redhat.com>
1606 * typeck.c (build_array_ref): Take complain parm.
1607 * cp-tree.h: Add it to prototype.
1608 * call.c (build_new_op): Pass it.
1609 * class.c (build_vtbl_ref): Pass it.
1610 * decl2.c (grok_array_decl): Pass it.
1614 * cp-tree.def (NULLPTR_TYPE): Remove.
1615 * cp-tree.h (NULLPTR_TYPE_P): New.
1616 (SCALAR_TYPE_P): Use it.
1617 (nullptr_type_node): New.
1618 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1619 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1621 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1622 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1623 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1624 * mangle.c (write_type): Likewise.
1625 * name-lookup.c (arg_assoc_type): Likewise.
1626 * typeck.c (build_reinterpret_cast_1): Likewise.
1627 * rtti.c (typeinfo_in_lib_p): Likewise.
1628 (emit_support_tinfos): Remove local nullptr_type_node.
1630 * cp-tree.h (UNKNOWN_TYPE): Remove.
1631 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1632 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1633 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1634 * class.c (instantiate_type): Check unknown_type_node rather than
1636 * name-lookup.c (maybe_push_decl): Likewise.
1637 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1638 (get_typeid): Likewise.
1639 * semantics.c (finish_offsetof): Likewise.
1642 * call.c (add_template_candidate_real): If deduction fails, still
1643 add the template as a non-viable candidate.
1644 (equal_functions): Handle template candidates.
1645 (print_z_candidate): Likewise.
1646 (print_z_candidates): Likewise.
1647 (build_new_function_call): Likewise.
1649 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1650 * call.c (add_candidates): Enforce it.
1651 (build_new_method_call): Try non-list ctor if no viable list ctor.
1652 (build_user_type_conversion_1): Likewise.
1654 * call.c (add_candidates): Distinguish between type(x) and
1656 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1657 (build_new_method_call): Give better error for conversion op.
1659 * call.c (add_candidates): Add first_arg and return_type parms.
1660 Add special constructor/conversion op handling.
1661 (convert_class_to_reference): Use it.
1662 (build_user_type_conversion_1): Likewise.
1663 (build_op_call): Likewise.
1664 (build_new_method_call): Likewise.
1665 (build_new_op): Adjust.
1666 (perform_overload_resolution): Adjust.
1668 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1673 * pt.c (process_partial_specialization): Return error_mark_node
1674 in case of unused template parameters in partial specialization.
1676 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1679 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1680 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1681 look at its second operand.
1683 2010-05-10 Jason Merrill <jason@redhat.com>
1686 * semantics.c (baselink_for_fns): Revert earlier change.
1689 * typeck.c (cp_build_modify_expr): Complain about assignment to
1690 array from init list.
1692 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1695 * decl.c (check_initializer): strip array type before checking for
1696 uninitialized const or ref members.
1698 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1701 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1702 error count. Emit errors only if compain is true.
1703 (build_new_1): Do not return error_mark_node if
1704 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1705 errors. Delay the check for user-provided constructor.
1706 (perform_member_init): Adjust.
1707 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1710 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1711 Jason Merrill <jason@redhat.com>
1713 Add support for C++0x nullptr.
1714 * cp-tree.def: Add NULLPTR_TYPE.
1715 * cp-tree.h: Add nullptr_node.
1716 (cp_tree_index): Add CPTI_NULLPTR.
1717 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1718 * call.c (null_ptr_cst_p): Handle nullptr.
1719 (standard_conversion): Likewise.
1720 (convert_arg_to_ellipsis): Likewise.
1721 * mangle.c (write_type): Likewise.
1722 * name-lookup.c (arg_assoc_type): Likewise.
1723 * parser.c (cp_parser_primary_expression): Likewise.
1724 * typeck.c (cp_build_binary_op): Likewise.
1725 (build_reinterpret_cast_1): Likewise.
1726 * error.c (dump_type): Likewise.
1727 (dump_type_prefix, dump_type_suffix): Likewise.
1728 * decl.c (cxx_init_decl_processing): Likewise.
1729 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1730 * cvt.c (ocp_convert): Likewise.
1731 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1732 nullptr_t tinfo in libsupc++.
1734 2010-05-06 Jason Merrill <jason@redhat.com>
1736 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1738 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1739 Dodji Seketeli <dodji@redhat.com>
1742 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1744 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1745 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1746 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1747 (cp_build_unary_op): Call lvalue_use.
1748 * decl.c (unused_but_set_errorcount): New variable.
1749 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1750 (duplicate_decls): Merge DECL_READ_P flags.
1751 (start_cleanup_fn): Set DECL_READ_P flag.
1752 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1753 * tree.c (rvalue): Call rvalue_use.
1754 * pt.c (convert_nontype_argument): Likewise.
1755 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1756 finish_decltype_type): Likewise.
1757 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1758 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1759 or rvalue_use depending on the expr.
1760 * init.c (build_new, build_delete): Likewise.
1761 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1763 2010-05-05 Jason Merrill <jason@redhat.com>
1766 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1767 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1769 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1772 * pt.c (unify): Check each elt for error_mark_node.
1774 2010-05-04 Jason Merrill <jason@redhat.com>
1777 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1779 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1782 * call.c (build_new_method_call): Return error_mark_node if fns is
1785 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1788 * pt.c (most_specialized_class): Pretend we are processing
1789 a template decl during the call to coerce_template_parms.
1791 2010-05-03 Jason Merrill <jason@redhat.com>
1795 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1796 from the selected underlying type unless -fstrict-enums. Set
1797 ENUM_UNDERLYING_TYPE to have the restricted range.
1798 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
1799 * class.c (check_bitfield_decl): Likewise.
1801 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
1804 * init.c (build_new_1): Revert the accidental checkin in
1807 2010-04-30 Jason Merrill <jason@redhat.com>
1810 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
1811 (pp_cxx_type_specifier_seq): ...here.
1813 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1815 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
1816 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1818 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
1821 * typeck.c (warn_args_num): New function.
1822 (convert_arguments): Use warn_args_num to print the diagnostic
1825 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
1828 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1829 user-provided constructor while recursing.
1831 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
1834 * error.c (print_instantiation_partial_context_line): Handle
1835 recursive instantiation.
1836 (print_instantiation_partial_context): Likewise.
1838 2010-04-27 Jason Merrill <jason@redhat.com>
1840 * init.c (perform_member_init): Check CLASS_TYPE_P.
1842 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1845 * init.c (perform_member_init): check for uninitialized const or
1846 reference members, including array types.
1848 2010-04-24 Jason Merrill <jason@redhat.com>
1850 * tree.c (get_fns): Split out from get_first_fn.
1851 * cp-tree.h: Declare it.
1852 * search.c (shared_member_p): Use it.
1853 * semantics.c (finish_qualified_id_expr): Simplify.
1854 (finish_id_expression): Simplify.
1856 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1857 whenever object is NULL_TREE. Don't do 'this' capture here.
1858 (finish_qualified_id_expr): Pass NULL_TREE.
1859 (finish_id_expression): Likewise.
1860 (lambda_expr_this_capture): Likewise.
1862 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1863 rather than checking current_class_ref directly.
1864 (finish_call_expr): Likewise.
1867 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1868 * class.c (current_nonlambda_class_type): New fn.
1869 * semantics.c (nonlambda_method_basetype): New.
1870 * cp-tree.h: Declare them.
1871 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1873 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1876 * semantics.c (lambda_return_type): Complain about
1880 * tree.c (cv_unqualified): Handle error_mark_node.
1883 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1884 if we don't want errors.
1887 * class.c (convert_to_base): Add complain parameter. Pass
1888 ba_quiet to lookup_base if we don't want errors.
1889 (build_vfield_ref): Pass complain to convert_to_base.
1890 * call.c (convert_like_real): Likewise.
1891 (initialize_reference): Likewise.
1892 (perform_direct_initialization_if_possible): Pass complain to
1894 * cp-tree.h: Adjust.
1896 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1897 Jason Merrill <jason@redhat.com>
1900 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1902 (check_initializer): Call it for classes that need constructing, too.
1903 * class.c (in_class_defaulted_default_constructor): New.
1904 * cp-tree.h: Declare it.
1906 2010-04-20 Jason Merrill <jason@redhat.com>
1909 * init.c (constant_value_1): Treat error_mark_node as a constant
1910 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1911 * cvt.c (ocp_convert): Handle getting error_mark_node from
1912 integral_constant_value.
1913 * decl.c (compute_array_index_type): Likewise.
1915 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1919 * typeck.c (incompatible_dependent_types_p): If one of the
1920 compared types if not a typedef then honour their main variant
1923 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1925 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1927 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1930 * typeck.c (structural_comptypes): Test dependent typedefs
1931 incompatibility before testing for their main variant based
1934 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1936 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1937 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1939 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1941 * decl.c (cxx_init_decl_processing): Remove second argument in call to
1942 build_common_tree_nodes.
1944 2010-04-14 Jason Merrill <jason@redhat.com>
1947 * parser.c (cp_parser_parenthesized_expression_list): Change
1948 is_attribute_list parm to int to indicate whether or not to
1949 handle initial identifier specially.
1950 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1952 2010-04-13 Jason Merrill <jason@redhat.com>
1954 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1956 * parser.c (cp_parser_lambda_expression): Complain about lambda in
1957 unevaluated context.
1958 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1960 2010-04-12 Jason Merrill <jason@redhat.com>
1963 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1964 return value directly.
1966 * call.c (type_decays_to): Call cv_unqualified for non-class type.
1968 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
1971 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1972 * init.c (build_new_1): Check for uninitialized const members and
1973 uninitialized reference members, when using new without
1974 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1975 (diagnose_uninitialized_cst_or_ref_member): Define, call
1976 diagnose_uninitialized_cst_or_ref_member_1.
1977 (diagnose_uninitialized_cst_or_ref_member_1): New function.
1979 2010-04-12 Richard Guenther <rguenther@suse.de>
1982 * semantics.c (expand_or_defer_fn_1): Do not keep extern
1983 template inline functions.
1985 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1988 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1991 2010-04-07 Jason Merrill <jason@redhat.com>
1994 * decl.c (start_preparsed_function): Do defer nested functions.
1996 PR c++/11094, DR 408
1997 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1998 * decl2.c (finish_static_data_member_decl): Set it.
1999 * decl.c (duplicate_decls): Propagate it.
2000 * pt.c (tsubst_decl): Don't substitute the domain of an array
2001 VAR_DECL if it's set.
2002 (regenerate_decl_from_template): Substitute it here.
2003 (type_dependent_expression_p): Return true if it's set.
2004 * semantics.c (finish_decltype_type): Instantiate such a variable.
2005 * typeck.c (cxx_sizeof_expr): Likewise.
2006 (strip_array_domain): New.
2009 * name-lookup.c (current_decl_namespace): Non-static.
2010 (pop_nested_namespace): Sanity check.
2011 * cp-tree.h: Declare current_decl_namespace.
2012 * decl.c (grokvardecl): Use it instead of current_namespace.
2013 (grokfndecl): Likewise.
2016 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2019 * pt.c (print_template_statistics): New.
2020 * cp-tree.h: Declare it.
2021 * tree.c (cxx_print_statistics): Call it.
2024 * decl.c (grokvardecl): Tweak warning message.
2025 (grokfndecl): Likewise.
2027 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2030 *pt.c (tsubst_decl): Get the arguments of a specialization from
2031 the specialization template, not from the most general template.
2033 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2036 * typeck2.c (process_init_constructor_record):
2037 value-initialize members that are are not explicitely
2040 2010-04-07 Jie Zhang <jie@codesourcery.com>
2043 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2044 when all of its elements are non-constant and have been split out.
2046 2010-04-06 Taras Glek <taras@mozilla.com>
2047 Jason Merrill <jason@redhat.com>
2049 * parser.c (cp_parser_class_specifier): Set class location to that
2050 of IDENTIFIER_NODE instead of '{' when possible.
2051 * semantics.c (begin_class_definition): Do not overide locations
2052 with less precise ones.
2054 2010-04-06 Jason Merrill <jason@redhat.com>
2057 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2060 * pt.c (maybe_update_decl_type): Check the return value from
2063 2010-04-01 Jason Merrill <jason@redhat.com>
2065 * decl.c (next_initializable_field): No longer static.
2066 * cp-tree.h: Declare it.
2067 * call.c (build_aggr_conv): Fail if there are more initializers
2068 than initializable fields.
2070 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2071 instead of void_zero_node.
2073 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2076 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2077 * pt.c (end_template_parm_list): Store sibling template parms of
2078 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2079 (push_template_decl_real): Don't store the containing template decl
2080 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2081 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2082 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2085 2010-03-30 Jason Merrill <jason@redhat.com>
2088 * pt.c (push_template_decl_real): Deal better with running out of
2089 scopes before running out of template parms.
2093 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2094 function parameter context. Don't print an error if parsing
2098 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2101 2010-03-26 Jason Merrill <jason@redhat.com>
2104 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2105 c++0x mode, but not other type-names.
2107 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2110 * pt.c (add_to_template_args): Support NULL ARGS;
2111 (most_specialized_class): call coerce_template_parms on
2112 template arguments passed to get_class_bindings. Use
2113 add_to_template_args.
2114 (unify): Handle VAR_DECLs.
2116 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2118 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2120 * pt.c (get_template_parms_at_level): Adjust.
2122 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2125 * cp-tree.h (get_template_parms_at_level): Declare ...
2126 * pt.c (get_template_parms_at_level): ... new function.
2127 * typeck.c (get_template_parms_of_dependent_type): If a template
2128 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2129 current_template_parms. Use get_template_parms_at_level. Remove
2131 (incompatible_dependent_types_p): If we get empty parms from just one
2132 of the template type parms we are comparing then the template parms are
2135 2010-03-24 Jason Merrill <jason@redhat.com>
2138 * parser.c (make_declarator): Initialize id_loc.
2139 (cp_parser_lambda_declarator_opt): And set it.
2141 2010-03-23 Jason Merrill <jason@redhat.com>
2143 Make lambda conversion op and op() non-static.
2144 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2145 Also add the thunk function returned by the conversion op.
2146 Mark the conversion deleted if the op() is variadic.
2147 * decl2.c (mark_used): Give helpful message about deleted conversion.
2148 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2149 * semantics.c (finish_this_expr): Adjust.
2150 * mangle.c (write_closure_type_name): Adjust.
2151 * decl.c (grok_op_properties): Don't allow it.
2152 * call.c (build_user_type_conversion_1): No static conversion ops.
2153 (build_op_call): Or op().
2155 * decl2.c (change_return_type): Fix 'this' quals.
2157 2010-03-22 Jason Merrill <jason@redhat.com>
2160 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2163 * pt.c (contains_auto_r): New fn.
2164 (do_auto_deduction): Use it.
2165 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2167 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2170 * decl2.c (grokfield): Handle invalid initializers for member
2173 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2176 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2178 * decl2.c (vague_linkage_p): Likewise.
2180 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2183 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2184 false, in the cp_parser_expression_statement call.
2186 2010-03-05 Jason Merrill <jason@redhat.com>
2188 * mangle.c (mangle_decl): Give name collision error even without
2191 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2193 * pt.c (process_partial_specialization): Use error_n instead of
2196 2010-03-03 Jason Merrill <jason@redhat.com>
2199 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2201 2010-03-03 Jason Merrill <jason@redhat.com>
2204 * mangle.c: Include cgraph.h.
2205 (mangle_decl): If the mangled name will change in a later
2206 ABI version, make the later mangled name an alias.
2207 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2208 * Make-lang.in (mangle.o): Depend on cgraph.h.
2209 * method.c (make_alias_for): Handle VAR_DECL, too.
2210 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2211 * tree.c (no_linkage_check): Adjust.
2212 * decl.c (maybe_commonize_var): Adjust.
2213 * cp-tree.h: Adjust.
2215 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2217 * pt.c (redeclare_class_template): Use error_n and inform_n.
2219 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2222 * cp-tree.h (push_tinst_level): Declare.
2223 (pop_tinst_level): Likewise.
2224 * pt.c (push_tinst_level): Give it external linkage.
2225 (pop_tinst_level): Likewise.
2226 * mangle.c (mangle_decl_string): Set the source location to that
2227 of the decl while mangling.
2229 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2232 * pt.c (redeclare_class_template): Return false if there are erroneous
2233 template parameters.
2235 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2237 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2240 2010-02-24 Jason Merrill <jason@redhat.com>
2243 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2245 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2246 in a previous ABI version.
2248 2010-02-23 Jason Merrill <jason@redhat.com>
2251 * typeck2.c (digest_init_r): Accept value init of array.
2253 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2256 * typeck.c (convert_arguments): Update error message.
2258 2010-02-22 Mike Stump <mikestump@comcast.net>
2261 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2263 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2266 * error.c (print_instantiation_partial_context_line): New.
2267 (print_instantiation_partial_context): Print at most 12 contexts,
2268 skip the rest with a message.
2270 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2273 * pt.c (lookup_template_class): Better support of specialization
2274 of member of class template implicit instantiation.
2276 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2279 * call.c (conversion_null_warnings): Replace -Wconversion with
2281 * cvt.c (build_expr_type_conversion): Likewise.
2283 2010-02-18 Jason Merrill <jason@redhat.com>
2286 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2289 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2291 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2292 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2295 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2299 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2300 (maybe_update_decl_type): New fn.
2301 * parser.c (cp_parser_init_declarator): Use it.
2304 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2306 2010-02-17 Jason Merrill <jason@redhat.com>
2309 * call.c (build_over_call): Don't create zero-sized assignments.
2310 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2311 * cp-objcp-common.c (cp_expr_size): Remove.
2312 * cp-tree.h: Remove prototype.
2315 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2316 decl we looked up doesn't match.
2319 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2320 have an INIT_EXPR anymore.
2323 * pt.c (convert_nontype_argument): Change assert to test.
2325 2010-02-16 Jason Merrill <jason@redhat.com>
2327 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2330 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2331 VIEW_CONVERT_EXPR for conversions between structural equality types
2332 that the back end can't tell are the same.
2335 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2336 cv-quals from element here.
2337 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2339 2010-02-14 Jason Merrill <jason@redhat.com>
2342 * semantics.c (finish_compound_literal): Use
2343 cp_apply_type_quals_to_decl when creating a static variable.
2345 2010-02-12 Jason Merrill <jason@redhat.com>
2348 * name-lookup.h (current_binding_level): Check for null
2351 2010-02-12 Jason Merrill <jason@redhat.com>
2354 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2356 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2359 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2362 2010-02-10 Jason Merrill <jason@redhat.com>
2365 * semantics.c (outer_lambda_capture_p): Revert.
2366 (add_capture): Only finish_member_declaration if
2367 we're in the lambda class.
2368 (register_capture_members): New.
2369 * cp-tree.h: Declare it.
2370 * parser.c (cp_parser_lambda_expression): Call it.
2372 2010-02-10 Jason Merrill <jason@redhat.com>
2375 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2376 instead of current_class_type.
2378 2010-02-10 Jason Merrill <jason@redhat.com>
2380 PR c++/42983, core issue 906
2381 * method.c (defaultable_fn_check): Check virtualness.
2383 2010-02-10 Jason Merrill <jason@redhat.com>
2386 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2388 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2390 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2391 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2393 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2394 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2395 (cp_parser_parameter_declaration)
2396 (cp_parser_exception_specification_opt)
2397 (cp_parser_exception_declaration): Likewise.
2398 * pt.c (check_default_tmpl_args): Likewise.
2399 * search.c (lookup_field_r): Likewise.
2401 2010-02-09 Jason Merrill <jason@redhat.com>
2404 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2406 2010-02-09 Jason Merrill <jason@redhat.com>
2409 * decl2.c (change_return_type): New fn.
2410 * semantics.c (apply_lambda_return_type): Use it.
2411 * cp-tree.h: Declare it.
2413 2010-02-05 Richard Guenther <rguenther@suse.de>
2415 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2416 * cp-lang.c: Include gt-cp-cp-lang.h.
2417 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2419 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2422 * typeck.c (get_template_parms_of_dependent_type): Try getting
2423 the template parameters fromt the type itself first.
2425 2010-02-03 Jason Merrill <jason@redhat.com>
2429 * mangle.c (write_unqualified_id): Split out from write_expression.
2430 (write_unqualified_name): Call it.
2431 (write_member_name): Likewise.
2432 (write_expression): Support TEMPLATE_ID_EXPR.
2433 Disambiguate operator names.
2436 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2439 2010-02-02 Jason Merrill <jason@redhat.com>
2442 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2443 * optimize.c (clone_body): Remap their initializers when making base
2445 (maybe_clone_body): Complain if multiple clones aren't safe.
2447 2010-01-29 Dodji Seketeli <dodji@redhat.com>
2454 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2455 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2456 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
2457 * pt.c (coerce_template_parms, type_unification_real,
2458 expand_template_argument_pack, coerce_template_parameter_pack):
2459 Set the non default template args count.
2460 (current_template_args): Always set non defaulted
2461 template args count when compiled with --enable-checking
2462 (tsubst_template_args, type_unification_real): Propagate the non
2463 defaulted template args count.
2464 * error.c (get_non_default_template_args_count): Renamed
2465 count_non_default_template_args into this. Don't calculate the
2466 non default template argument count anymore. Use the new
2467 accessor macros above to get it.
2468 (dump_template_argument_list, dump_type, dump_decl,
2469 dump_template_parms): Adjust.
2470 * parser.c (cp_parser_template_argument_list): Always set defaulted
2471 template args count when compiled with --enable-checking.
2473 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2475 * decl.c (redeclaration_error_message): Wrap the return messages into
2476 G_() for easy translation.
2478 2010-01-28 Jason Merrill <jason@redhat.com>
2481 * semantics.c (begin_class_definition): Don't use type_as_string.
2483 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2487 * typeck.c (get_template_parms_of_dependent_type): Factorized
2488 this out of incompatible_template_type_parms_p
2489 (incompatible_dependent_types_p): Renamed
2490 incompatible_template_type_parms_p into this. Make it detect
2491 two incompatible dependent typedefs too.
2492 (structural_comptypes): Use incompatible_dependent_types_p.
2493 * pt.c (get_template_info):
2494 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2496 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2497 Jason Merrill <jason@redhat.com>
2499 * mangle.c (write_type): Mangle transparent record as member type.
2500 * semantics.c (begin_class_definition): Recognize decimal classes
2501 and set TYPE_TRANSPARENT_AGGR.
2503 2010-01-20 Jason Merrill <jason@redhat.com>
2506 * mangle.c (write_expression): Handle tree codes that have extra
2507 arguments in the middle-end.
2509 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2512 * except.c (expand_start_catch_block): Deal correctly with
2513 do_begin_catch returning error_mark_node.
2515 2010-01-20 Jason Merrill <jason@redhat.com>
2518 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2522 * semantics.c (build_lambda_object): Call mark_used on captured
2526 * decl.c (grokdeclarator): Clear type_quals for a member function
2527 declared using a typedef. Don't complain about adding cv-quals
2528 to a function typedef in C++0x mode.
2530 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2532 * decl.c (create_array_type_for_decl): Remove set but not used
2533 variable error_msg. Remove break stmts after return stmts.
2535 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2537 * error.c (dump_template_parms, count_non_default_template_args):
2538 Revert fix of PR c++/42634.
2540 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2543 * error.c (dump_template_parms): Use innermost template
2544 arguments before calling count_non_default_template_args.
2545 (count_non_default_template_args): We are being called with
2546 template innermost arguments now. There is no need to ensure
2549 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2552 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2554 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2557 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2559 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2562 *pt.c (tsubst_decl): Get the arguments of a specialization from
2563 the specialization template, not from the most general template.
2565 2010-01-16 Jason Merrill <jason@redhat.com>
2568 * semantics.c (finish_decltype_type): Within a template, treat
2569 unresolved CALL_EXPR as dependent.
2571 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2573 * error.c (dump_template_parms,count_non_default_template_args):
2574 Revert changes of PR c++/42634.
2576 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2579 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2580 functions with noreturn attribute.
2582 2010-01-14 Jason Merrill <jason@redhat.com>
2585 * call.c (build_new_method_call): Don't free the vec here.
2588 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2590 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2593 * error.c (dump_template_parms): Use innermost template
2594 arguments before calling count_non_default_template_args.
2595 (count_non_default_template_args): We are being called with
2596 template innermost arguments now. There is no need to ensure
2599 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2602 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2603 arguments that were previously deduced.
2605 2010-01-05 Jason Merrill <jason@redhat.com>
2607 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2608 * call.c (build_over_call): Don't complain about it.
2610 2010-01-04 Jason Merrill <jason@redhat.com>
2613 * pt.c (tsubst_decl): Don't apply type attributes in place.
2616 * semantics.c (describable_type): Remove decltype comment and
2621 Copyright (C) 2010 Free Software Foundation, Inc.
2623 Copying and distribution of this file, with or without modification,
2624 are permitted in any medium without royalty provided the copyright
2625 notice and this notice are preserved.