1 2010-09-28 Jason Merrill <jason@redhat.com>
3 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
4 (real_lvalue_p): Take const_tree.
6 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
7 (cp_build_addr_expr_1): Likewise.
9 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11 Partially merged from apple/trunk branch on FSF servers:
12 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13 Radar 3803157 (method attributes)
15 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
16 (cp_parser_objc_method_tail_params_opt): Likewise.
17 (cp_parser_objc_method_signature): Likewise.
18 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
19 (cp_parser_objc_method_prototype_list): Handle attributes.
20 (cp_parser_objc_method_definition_list): Likewise.
22 2010-09-28 Richard Henderson <rth@redhat.com>
24 * cp-lang.c: Include "target.h".
25 (cp_eh_personality): Use targetm.except_unwind_info.
26 * Make-lang.in (cp-lang.o): Update deps.
28 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
30 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
31 (cp_parser_declaration): Parse prefix attributes for ObjC++.
32 (cp_parser_objc_protocol_declaration): Handle attributes.
33 (cp_parser_objc_class_interface): Likewise.
34 (cp_parser_objc_declaration): Likewise.
36 2010-09-27 Jason Merrill <jason@redhat.com>
38 Require lvalues as specified by the standard.
39 * typeck.c (lvalue_or_else): Use real_lvalue_p.
40 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
41 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
42 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
43 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
44 (build_const_cast_1): Adjust.
45 * cp-tree.h: Declare new fns.
46 * call.c (build_this, convert_like_real, build_over_call): Adjust.
47 (initialize_reference): Adjust.
48 * class.c (build_base_path, convert_to_base_statically): Adjust.
49 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
50 * cvt.c (build_up_reference, convert_to_reference): Adjust.
51 * decl.c (register_dtor_fn): Adjust.
52 * decl2.c (build_offset_ref_call_from_tree): Adjust.
53 * except.c (initialize_handler_parm): Adjust.
54 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
55 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
56 * tree.c (stabilize_expr): Adjust.
58 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
60 Merge from apple/trunk branch on FSF servers:
62 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
65 * typeck.c (composite_pointer_type): Call objc_have_common_type
66 when comparing two objective-c pointer types.
68 2005-07-18 Ziemowit Laski <zlaski@apple.com>
71 * call.c (standard_conversion): Do not issue warnings when
72 comparing ObjC pointer types.
74 2005-06-22 Ziemowit Laski <zlaski@apple.com>
77 * call.c (standard_conversion): Allow for a pointer conversion
78 between any two ObjC pointer types.
79 * typeck.c (composite_pointer_type): Determine common type
80 for two ObjC pointer types.
82 2010-09-24 Jan Hubicka <jh@suse.cz>
84 * decl.c (finish_function): Use decl_replaceable_p
85 * method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias.
87 2010-09-24 Jason Merrill <jason@redhat.com>
89 * decl.c (compute_array_index_type): Remember type dependence of
91 * pt.c (dependent_type_p_r): Don't recompute it here.
93 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
94 reference and pointer to the same type as "*" or "&".
96 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
98 * typeck.c (warn_args_num): Use warning 'too many arguments to
99 method [methodname]' for an Objective-C method instead of the less
100 satisfactory 'too many arguments to function' (with no method
103 2010-09-21 Jason Merrill <jason@redhat.com>
105 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
106 special handling if we know the member.
108 2010-09-18 Jason Merrill <jason@redhat.com>
110 * call.c (compare_ics): Do lvalue/rvalue reference binding
111 comparison for ck_list, too.
113 2010-09-15 Jason Merrill <jason@redhat.com>
115 * semantics.c (finish_id_expression): Diagnose use of function
116 parms in evaluated context outside function body.
118 * decl2.c (grokbitfield): Diagnose non-integral width.
120 * call.c (convert_like_real): Use the underlying type of the
121 reference for the temporary.
123 2010-09-15 Jakub Jelinek <jakub@redhat.com>
126 * class.c (build_vtbl_initializer): Use fn instead of init's operand
127 as first argument to FDESC_EXPR.
129 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
132 * decl.c (grokdeclarator): Check build_memfn_type return value
135 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
137 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
138 (begin_range_for_stmt): Likewise.
140 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
142 Implement range-based for-statements.
143 * cp-tree.def (RANGE_FOR_STMT): New.
144 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
145 (cp_convert_range_for): Declare.
146 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
147 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
148 * semantics.c (begin_range_for_stmt): New.
149 (finish_range_for_decl): New.
150 (finish_for_stmt): Accept also RANGE_FOR_STMT.
151 (perform_koenig_lookup): Add extra argument include_std.
152 * parser.c (cp_parser_c_for): New with code from
153 cp_parser_iteration_statement().
154 (cp_parser_range_for): New.
155 (cp_convert_range_for): New.
156 (cp_parser_iteration_statement): Add range-for support.
157 (cp_parser_condition): Adjust comment.
158 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
160 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
161 * cxx-pretty-print.c: Likewise.
162 * lex.c (cxx_init): Likewise.
163 * name-lookup.c (lookup_function_nonclass): Add extra argument
165 (lookup_arg_dependent): Likewise.
166 * name-lookup.h: Likewise.
168 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
171 * error.c (maybe_warn_cpp0x): Add new warning
172 CPP0X_INLINE_NAMESPACES.
173 * parser.c (cp_parser_namespace_definition): Likewise.
174 * cp-tree.h (cpp0x_warn_str): Likewise.
176 2010-09-10 Richard Guenther <rguenther@suse.de>
178 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
179 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
181 2010-09-10 Jan Hubicka <jh@suse.cz>
183 PR tree-optimization/45605
184 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
187 2010-09-08 Jakub Jelinek <jakub@redhat.com>
190 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
191 before calling fold_decl_constant_value.
193 2010-09-07 Arnaud Charlet <charlet@adacore.com>
195 * cp-tree.h (build_enumerator): Add new location_t parameter.
196 (build_lang_decl_loc): New function.
197 * decl.c (build_enumerator): New parameter loc. Use it when calling
198 build_decl. Replace build_lang_decl with build_lang_decl_loc.
199 * pt.c (tsubst_enum): Adjust call to build_enumerator.
200 * parser.c (cp_parser_enumerator_definition): Ditto.
201 * lex.c (build_lang_decl_loc): New function.
203 2010-09-06 Dodji Seketeli <dodji@redhat.com>
208 * tree.c (strip_typedefs): Strip typedefs from the context of
211 2010-09-06 Mark Mitchell <mark@codesourcery.com>
213 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
214 * call.c (build_conditional_expr): Likewise.
215 (convert_arg_to_ellipsis): Likewise.
217 2010-09-06 Arnaud Charlet <charlet@adacore.com>
219 * parser.c (make_pointer_declarator, make_reference_declarator,
220 make_call_declarator, make_array_declarator): Set declarator->id_loc.
221 (cp_parser_init_declarator): Adjust location of decl if appropriate.
223 2010-09-06 Jason Merrill <jason@redhat.com>
225 * call.c (implicit_conversion): Fix value-init of enums.
226 (convert_like_real): Likewise.
228 * decl.c (cp_finish_decl): Don't change init for auto deduction.
230 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
231 (fold_non_dependent_expr): ...here.
232 (convert_nontype_argument): Use it. Take complain parm.
233 Use perform_implicit_conversion instead of ocp_convert.
234 Allow cv-qual changes.
235 (convert_template_argument): Pass complain down.
236 (tsubst_template_arg): Suppress constant expression warnings.
239 * method.c (synthesized_method_walk): In constructors, also check
240 subobject destructors.
242 * semantics.c (finish_compound_literal): Always build a
245 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
248 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
250 2010-08-30 Jakub Jelinek <jakub@redhat.com>
253 * parser.c (cp_parser_omp_atomic): Handle boolean
254 {PRE,POST}_INCREMENT.
256 2010-08-29 Jason Merrill <jason@redhat.com>
259 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
260 after tentative parsing.
262 2010-08-22 Joseph Myers <joseph@codesourcery.com>
264 * Make-lang.in (g++spec.o): Update dependencies.
265 * g++spec.c: Include opts.h
266 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
267 (lang_specific_driver): Use cl_decoded_option structures.
269 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
271 * call.c: Use FOR_EACH_VEC_ELT.
276 * except.c: Likewise.
277 * mangle.c: Likewise.
278 * method.c: Likewise.
279 * name-lookup.c: Likewise.
280 * parser.c: Likewise.
283 * semantics.c: Likewise.
284 * typeck2.c: Likewise.
286 2010-08-19 Jason Merrill <jason@redhat.com>
288 * call.c (reference_related_p): Check for error_mark_node.
289 (add_function_candidate): Check it instead of
290 same_type_ignoring_top_level_qualifiers_p.
293 * init.c (build_new_1): Don't use build_value_init in a template.
294 (build_value_init): Make sure we don't.
297 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
298 of empty class CONSTRUCTOR.
300 * except.c (pending_noexcept, pending_noexcept_checks): New.
301 (perform_deferred_noexcept_checks): New.
302 (maybe_noexcept_warning): Split from...
303 (finish_noexcept_expr): ...here. Adjust.
304 * decl2.c (cp_write_global_declarations): Call
305 perform_deferred_noexcept_checks.
306 * cp-tree.h: And declare it.
308 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
311 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
314 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
316 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
317 or if -fms-extensions is enabled check, check permissive.
319 2010-08-09 Jason Merrill <jason@redhat.com>
322 * pt.c (lookup_template_class): Don't re-coerce outer parms.
324 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
326 * call.c (add_builtin_candidates): Use VECs for local variable
327 `types'. Adjust remainder of function accordingly.
329 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
331 * name-lookup.c (is_associated_namespace): Convert local variables
332 to be VECs instead of TREE_LISTs.
334 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
336 * tree.c (varargs_function_p): Use stdarg_p.
338 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
340 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
341 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
342 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
343 Change type to a VEC.
344 (unparsed_funs_with_default_args): Define.
345 (unparsed_funs_with_definitions): Define.
346 (push_unparsed_function_queues): New function.
347 (cp_parser_new): Call it.
348 (pop_unparsed_function_queues): New function.
349 (cp_parser_class_specifier): Adjust processing of unparsed functions.
350 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
351 (cp_parser_save_member_function_body): Likewise.
352 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
353 and pop_unparsed_function_queues.
354 (cp_parser_late_parsing_default_args): Likewise.
355 (cp_parser_save_default_args): Use VEC_safe_push.
357 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
359 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
361 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
363 * decl.c (poplevel): Adjust for type changes.
364 (declare_local_label): Likewise.
366 2010-08-06 Jason Merrill <jason@redhat.com>
368 * typeck.c (complete_type_or_maybe_complain): Split out from...
369 (complete_type_or_else): Here.
370 (build_class_member_access_expr): Call it.
371 (finish_class_member_access_expr): Likewise.
372 * call.c (build_special_member_call): Likewise.
373 * cvt.c (build_expr_type_conversion): Likewise.
374 * init.c (build_new): Likewise.
375 * typeck2.c (build_functional_cast): Likewise.
376 * cp-tree.h: Declare it.
378 * init.c (build_value_init): Add complain parm.
379 (build_value_init_noctor): Likewise.
380 (perform_member_init): Pass it.
381 (expand_aggr_init_1): Likewise.
382 (build_new_1): Likewise.
383 (build_vec_init): Likewise.
384 * pt.c (tsubst_expr): Likewise.
385 * typeck2.c (build_functional_cast): Likewise.
387 * tree.c (build_target_expr_with_type): Handle error_mark_node.
389 * typeck.c (decay_conversion): Any expression with type nullptr_t
392 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
395 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
397 2010-07-27 Jason Merrill <jason@redhat.com>
399 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
400 from build_value_init.
401 * init.c (build_value_init_noctor): Give error for unknown array
404 2010-07-27 Joseph Myers <joseph@codesourcery.com>
406 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
408 2010-07-27 Joseph Myers <joseph@codesourcery.com>
410 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
411 c_common_initialize_diagnostics.
412 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
413 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
415 2010-07-21 Jason Merrill <jason@redhat.com>
417 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
419 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
422 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
425 * pt.c (instantiate_class_template): Propagate the template's
426 location to its instance.
428 2010-07-20 Jason Merrill <jason@redhat.com>
431 * pt.c (tsubst_copy_and_build): Rework last change.
434 * pt.c (tsubst_copy_and_build): Handle partial substitution of
437 2010-07-19 Jason Merrill <jason@redhat.com>
440 * semantics.c (finish_decltype_type): Correct decltype
441 of parenthesized rvalue reference variable.
444 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
445 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
447 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
450 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
452 * cp-tree.h: Adjust declaration.
453 * init.c (perform_member_init): Adjust caller.
454 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
455 * typeck2.c (store_init_value): Likewise.
456 (build_functional_cast): Pass complain argument to
457 build_x_compound_expr_from_list.
459 2010-07-16 Jason Merrill <jason@redhat.com>
462 * pt.c (process_partial_specialization): Diagnose partial
463 specialization after instantiation.
464 (most_specialized_class): Add complain parm.
466 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
468 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
470 * init.c (build_new_1): Use cp_build_function_call_nary instead of
471 cp_build_function_call.
473 2010-07-15 Jason Merrill <jason@redhat.com>
476 * call.c (add_function_candidate): If we're working on an implicit
477 declaration, don't consider candidates that won't match.
478 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
479 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
482 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
483 (TYPE_HAS_USER_OPEQ): New.
484 * decl.c (grok_special_member_properties): Set it.
485 * class.c (add_implicitly_declared_members): Don't lazily declare
486 constructors/operator= if a base or member has a user-declared one.
487 (check_bases_and_members, check_bases): Adjust.
488 (check_field_decls, check_field_decl): Adjust.
490 2010-07-15 Anatoly Sokolov <aesok@post.ru>
492 * decl.c (integer_three_node): Remove.
493 (cxx_init_decl_processing): Do not initialize the integer_three_node.
494 * cp-tree.h (integer_three_node): Remove.
496 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
498 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
501 * cp-gimplify.c: Likewise.
505 * mangle.c: Likewise.
506 * name-lookup.c: Likewise.
507 * optimize.c: Likewise.
508 * parser.c: Likewise.
511 * search.c: Likewise.
512 * semantics.c: Likewise.
513 * typeck.c: Likewise.
514 * typeck2.c: Likewise.
516 2010-07-14 Jason Merrill <jason@redhat.com>
518 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
519 (build_field_list): Cache field type.
521 Implement C++0x unrestricted unions (N2544)
522 * class.c (check_field_decl): Loosen union handling in C++0x.
523 * method.c (walk_field_subobs): Split out from...
524 (synthesized_method_walk): ...here. Set msg before loops.
525 (process_subob_fn): Check for triviality in union members.
526 * init.c (sort_mem_initializers): Splice out uninitialized
527 anonymous unions and union members.
528 (push_base_cleanups): Don't automatically destroy anonymous unions
531 2010-07-13 Jason Merrill <jason@redhat.com>
534 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
535 (TYPE_HAS_USER_OPEQ): New.
536 * decl.c (grok_special_member_properties): Set it.
537 * class.c (add_implicitly_declared_members): Don't lazily declare
538 constructors/operator= if a base or member has a user-declared one.
539 (check_bases_and_members, check_bases): Adjust.
540 (check_field_decls, check_field_decl): Adjust.
541 * method.c (synthesized_method_walk): Initialize check_vdtor.
544 * mangle.c (write_type): Canonicalize.
545 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
546 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
548 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
551 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
553 * typeck.c (get_delta_difference): Update prototype, add a
554 tsubst_flags_t parameter; update get_delta_difference_1 calls and
555 add checks for error_mark_node.
556 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
557 parameter; update lookup_base call.
558 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
559 parameter; update get_delta_difference call and add check for
561 (convert_ptrmem): Update prototype, add a tsubst_flags_t
562 parameter; update get_delta_difference call and add check for
563 error_mark_node; update build_ptrmemfunc call.
564 (build_static_cast_1): Adjust convert_ptrmem call.
565 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
566 (cp_build_unary_op): Adjust build_ptrmemfunc call.
567 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
568 and build_ptrmemfunc calls.
569 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
571 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
574 * call.c (build_temp): Add tsubst_flags_t complain parameter;
575 adjust build_special_member_call call, pass complain.
576 (convert_like_real): Adjust build_temp call, pass complain.
578 2010-07-09 Jason Merrill <jason@redhat.com>
581 * cp-tree.h (BV_LOST_PRIMARY): New macro.
582 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
584 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
586 2010-07-08 Jason Merrill <jason@redhat.com>
589 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
590 virtual bases for covariant thunks.
592 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
594 * cp-tree.h: Do not include toplev.h.
596 2010-07-06 Jason Merrill <jason@redhat.com>
599 * call.c (is_std_init_list): Look through typedefs.
602 * init.c (build_offset_ref): If scope isn't dependent,
603 don't exit early. Look at TYPE_MAIN_VARIANT.
604 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
606 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
608 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
610 * cp-tree.h (impl_conv_void): New type.
611 (convert_to_void): Adjust prototype.
612 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
613 diagnostic for easy translation. Change caller.
614 * typeck.c: Update call to convert_to_void.
615 * semantics.c: Likewise.
618 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
620 * decl.c (cp_finish_decl): Call add_local_decl.
621 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
623 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
625 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
628 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
631 * parser.c (cp_parser_primary_expression): Error if local template is
634 2010-07-02 Le-Chun Wu <lcwu@google.com>
637 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
638 (variable or type) shadows another type.
640 2010-07-02 Jakub Jelinek <jakub@redhat.com>
643 * typeck.c (convert_for_assignment): When converting a convertible
644 vector type or objc++ types, call mark_rvalue_use.
645 * typeck2.c (build_m_component_ref): Use return values from
646 mark_rvalue_use or mark_lvalue_use.
647 * class.c (build_base_path): Likewise.
648 * call.c (build_conditional_expr): Likewise.
650 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
653 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
656 2010-07-01 Richard Guenther <rguenther@suse.de>
658 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
659 predicate we are looking for, allow non-gimplified
662 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
665 * typeck.c (cp_build_unary_op): Early return error_mark_node when
666 arg is NULL_TREE too.
667 * call.c (convert_class_to_reference): Return error_mark_node when
670 2010-06-30 Michael Matz <matz@suse.de>
672 * repo.c (finish_repo): Fix typo.
674 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
676 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
678 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
680 * repo.c (pending_repo): Change type to a VEC.
681 (finish_repo): Adjust for new type of pending_repo.
682 (repo_emit_p): Likewise.
684 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
686 * tree.c: Include gimple.h. Do not include tree-flow.h
687 * decl.c: Do not include tree-flow.h
688 * Make-lang.in: Adjust dependencies.
690 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
692 * decl.c (incomplete_var): Declare. Declare VECs containing them.
693 (incomplete_vars): Adjust comment. Change type to a VEC.
694 (maybe_register_incomplete_var): Adjust for new type.
695 (complete_vars): Adjust iteration over incomplete_vars.
697 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
699 * decl.c (struct named_label_entry): Change type of bad_decls field
701 (poplevel_named_label_1): Adjust for new type of bad_decls.
702 (check_goto): Likewise.
704 2010-06-29 Jason Merrill <jason@redhat.com>
706 Enable implicitly declared move constructor/operator= (N3053).
707 * class.c (add_implicitly_declared_members): A class with no
708 explicitly declared copy or move constructor gets both declared
709 implicitly, and similarly for operator=.
710 (check_bases): A type with no copy ctor does not inhibit
711 a const copy ctor in a derived class. It does mean the derived
713 (check_field_decl): Likewise.
714 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
715 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
716 (trivially_copyable_p): Likewise.
717 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
718 * class.c (finish_struct_bits): Likewise.
719 * tree.c (build_target_expr_with_type): Likewise.
720 * typeck2.c (store_init_value): Likewise.
722 Enable implicitly deleted functions (N2346)
723 * class.c (check_bases_and_members): Adjust lambda flags.
724 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
726 * decl2.c (mark_used): Adjust error for use of deleted function.
728 Machinery to support implicit delete/move.
729 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
730 has_complex_move_ctor, has_complex_move_assign bitfields.
731 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
732 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
733 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
734 (enum special_function_kind): Add sfk_move_assignment.
735 (LOOKUP_SPECULATIVE): New.
736 * call.c (build_over_call): Return early if it's set.
737 (build_over_call): Use trivial_fn_p.
738 * class.c (check_bases): If the base has no default constructor,
739 the derived one is non-trivial. Handle move ctor/op=.
740 (check_field_decl): Likewise.
741 (check_bases_and_members): Handle move ctor/op=.
742 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
743 (type_has_move_constructor, type_has_move_assign): New.
744 * decl.c (grok_special_member_properties): Handle move ctor/op=.
745 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
747 (do_build_copy_constructor): Use it.
748 (do_build_assign_ref): Likewise. Handle move assignment.
749 (build_stub_type, build_stub_object, locate_fn_flags): New.
750 (locate_ctor): Use locate_fn_flags.
751 (locate_copy, locate_dtor): Remove.
752 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
753 (process_subob_fn, synthesized_method_walk): New.
754 (maybe_explain_implicit_delete): New.
755 (implicitly_declare_fn): Use synthesized_method_walk,
756 type_has_trivial_fn, and type_set_nontrivial_flag.
757 (defaulted_late_check): Set DECL_DELETED_FN.
758 (defaultable_fn_check): Handle sfk_move_assignment.
759 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
760 implicitly deleted move ctor/op=.
761 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
762 (lookup_fnfields_slot): New.
763 * semantics.c (omp_clause_info_fndecl): Remove.
764 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
765 get_copy_assign, trivial_fn_p.
766 (trait_expr_value): Adjust call to locate_ctor.
767 * tree.c (special_function_p): Handle sfk_move_assignment.
769 * class.c (type_has_virtual_destructor): New.
770 * cp-tree.h: Declare it.
771 * semantics.c (trait_expr_value): Use it.
773 * call.c (build_over_call): Only give warnings with tf_warning.
775 * name-lookup.c (pop_scope): Handle NULL_TREE.
777 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
778 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
779 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
780 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
781 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
782 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
783 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
784 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
785 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
786 (sfk_assignment_operator): Rename to sfk_copy_assignment.
787 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
788 * search.c, semantics.c, tree.c: Adjust.
790 * pt.c (dependent_scope_ref_p): Remove.
791 (value_dependent_expression_p): Don't call it.
792 (type_dependent_expression_p): Here either.
793 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
794 if the scope isn't dependent.
796 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
800 * pt.c (has_value_dependent_address): New.
801 (value_dependent_expression_p): Check it.
802 (convert_nontype_argument): Likewise. Call decay_conversion before
803 folding if we want a pointer.
804 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
805 scope is the current instantiation.
807 2010-06-28 Jakub Jelinek <jakub@redhat.com>
810 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
813 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
815 * init.c: Do not include except.h.
818 * cp-lang.c: Likewise.
820 * semantics.c: Likewise.
822 * except.c: Likewise.
823 (init_exception_processing): Do not set the removed
824 lang_protect_cleanup_actions here.
825 (cp_protect_cleanup_actions): Make non-static and remove prototype.
826 (doing_eh): New, moved from except.c but removed the do_warning flag.
827 (expand_start_catch_block): Update doing_eh call.
828 (expand_end_catch_block): Likewise.
829 (build_throw): Likewise.
830 * cp-tree.h: Prototype cp_protect_cleanup_actions.
831 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
832 cp_protect_cleanup_actions.
833 * Make-lang.in: Update dependencies.
835 2010-06-26 Jason Merrill <jason@redhat.com>
837 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
838 constructor called with a single argument that takes a reference
839 to the constructor's class.
840 (BAD_CONVERSION_RANK): New.
841 (compare_ics): Use it to compare bad ICSes.
843 2010-06-25 Joseph Myers <joseph@codesourcery.com>
845 * lang-specs.h: Remove +e handling.
847 2010-06-24 Andi Kleen <ak@linux.intel.com>
849 * parser.c: (cp_parser_question_colon_clause):
850 Switch to use cp_lexer_peek_token.
851 Call warn_for_omitted_condop. Call pedwarn for omitted
854 2010-06-22 Jakub Jelinek <jakub@redhat.com>
857 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
858 datum and mark_rvalue_use on component.
861 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
862 the CALL_EXPR has no arguments.
864 2010-06-21 Jason Merrill <jason@redhat.com>
866 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
868 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
871 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
873 * name-lookup.c (struct arg_lookup): Convert namespaces and
874 classes fields to VEC.
875 (arg_assoc_namespace): Adjust for new type of namespaces.
876 (arg_assoc_class): Adjust for new type of classes.
877 (lookup_arg_dependent): Use make_tree_vector and
879 * typeck2.c (build_x_arrow): Use vec_member.
881 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
884 * error.c (dump_decl): Better wording for anonymous namespace.
886 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
888 * class.c (build_vtbl_initializer): Adjust computation of new_position
889 and which entry to add padding for.
891 2010-06-16 Jason Merrill <jason@redhat.com>
893 * except.c (check_noexcept_r): Return the problematic function.
894 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
895 * pt.c (tsubst_copy_and_build): Pass it.
896 * parser.c (cp_parser_unary_expression): Likewise.
897 * cp-tree.h: Adjust prototype.
899 * method.c (defaulted_late_check): Give the defaulted method
900 the same exception specification as the implicit declaration.
902 2010-06-15 Jason Merrill <jason@redhat.com>
904 * class.c (add_implicitly_declared_members): Implicit assignment
905 operators can also be virtual overriders.
906 * method.c (lazily_declare_fn): Likewise.
908 * call.c (convert_like_real): Give "initializing argument of"
909 information for ambiguous conversion. Give source position
912 * call.c (print_z_candidates): Do print viable deleted candidates.
913 (joust): Don't choose a deleted function just because its worst
914 conversion is better than another candidate's worst.
916 * call.c (convert_like_real): Don't complain about
917 list-value-initialization from an explicit constructor.
919 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
920 DECL_SOURCE_LOCATION directly.
922 * class.c (type_has_user_provided_default_constructor): Use
925 * call.c (is_subseq): Handle ck_aggr, ck_list.
926 (compare_ics): Treat an aggregate or ambiguous conversion to the
927 same type as involving the same function.
929 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
931 * typeck.c (convert_for_assignment): Fix comment. Change message
932 format from %d to %qP.
933 (convert_for_initialization): Fix comment.
935 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
937 * cp-tree.h (expr_list_kind): New type.
938 (impl_conv_rhs): New type.
939 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
941 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
942 diagnostics for easy translation. Change caller.
943 (convert_for_initialization): Use impl_conv_rhs and change caller.
944 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
945 diagnostics for easy translation. Change caller.
946 * decl.c (bad_spec_place): New enum.
947 (bad_specifiers): Use it and emit the diagnostics for easy
948 translation. Change caller.
949 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
951 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
953 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
955 * decl2.c (cp_write_global_declarations): Adjust for new type of
957 * name-lookup.c (current_decl_namespace): Likewise.
958 (push_decl_namespace): Likewise.
959 (pop_decl_namespace): Likewise.
961 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
963 * call.c (build_java_interface_fn_ref): Call build_function_type_list
964 instead of build_function_type.
965 * decl.c (cxx_init_decl_processing): Likewise.
966 (declare_global_var): Likewise.
967 (get_atexit_node): Likewise.
968 (expand_static_init): Likewise.
969 * decl2.c (start_objects): Likewise.
970 (start_static_storage_duration_function): Likewise.
971 * except.c (init_exception_processing): Likewise.
972 (build_exc_ptr): Likewise.
973 (build_throw): Likewise.
974 * rtti.c (throw_bad_cast): Likewise.
975 (throw_bad_typeid): Likewise.
976 (build_dynamic_cast_1): Likewise.
978 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
980 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
981 (build_op_delete_call): Likewise.
982 (build_over_call): Likewise.
983 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
984 * pt.c (process_partial_specialization): Likewise.
985 (tsubst_template_args): Likewise.
986 * semantics.c (finish_asm_stmt): Likewise.
988 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
990 * decl.c (record_key_method_defined): New, broken out of ...
991 (finish_function): ... here. Call it.
992 (start_decl): Treat aliases as definitions.
994 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
996 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
998 * pt.c (maybe_process_partial_specialization): Likewise.
999 (register_specialization): Likewise.
1000 (add_pending_template): Likewise.
1001 (lookup_template_class): Likewise.
1002 (push_tinst_level): Likewise.
1004 * parser.c (cp_lexer_new_main): Likewise.
1005 (cp_lexer_new_from_tokens): Likewise.
1006 (cp_token_cache_new): Likewise.
1007 (cp_parser_context_new): Likewise.
1008 (cp_parser_new): Likewise.
1009 (cp_parser_nested_name_specifier_opt): Likewise.
1010 (cp_parser_template_id): Likewise.
1012 * name-lookup.c (binding_entry_make): Likewise.
1013 (binding_table_construct): Likewise.
1014 (binding_table_new): Likewise.
1015 (cxx_binding_make): Likewise.
1016 (pushdecl_maybe_friend): Likewise.
1017 (begin_scope): Likewise.
1018 (push_to_top_level): Likewise.
1020 * lex.c (init_reswords): Likewise.
1021 (retrofit_lang_decl): Likewise.
1022 (cxx_dup_lang_specific_decl): Likewise.
1023 (copy_lang_type): Likewise.
1024 (cxx_make_type): Likewise.
1026 * decl.c (make_label_decl): Likewise.
1027 (check_goto): Likewise.
1028 (start_preparsed_function): Likewise.
1029 (save_function_data): Likewise.
1031 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1033 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1035 * class.c (finish_struct_1): Likewise.
1037 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1038 (struct lang_decl): Likewise.
1040 * parser.c (cp_parser_new): Update comment to not reference
1043 2010-06-07 Jason Merrill <jason@redhat.com>
1046 * error.c (dump_parameters): Mask out TFF_SCOPE.
1047 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1048 (dump_scope): Remove no-op mask.
1051 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1053 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1054 * init.c (build_offset_ref): Use it.
1055 * pt.c (maybe_process_partial_specialization): Use it.
1056 (instantiate_class_template): Use it.
1057 * search.c (lookup_base): Use it.
1059 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1062 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1063 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1064 handled_component_p.
1067 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1068 set also DECL_READ_P on the decl.
1070 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1073 * cp-tree.h (typedef_variant_p): Move this declaration to
1075 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1076 * decl.c (grokdeclarator): Do not rename debug info of an
1077 anonymous tagged type named by a typedef.
1079 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1082 * class.c (check_field_decls): Move the call to
1083 check_bitfield_decl before trying to set the
1084 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1086 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1088 * typeck.c: Update include path for moved files.
1091 * cp-gimplify.c: Likewise.
1092 * cp-lang.c: Likewise.
1094 * semantics.c: Likewise.
1095 * cxx-pretty-print.h: Likewise.
1096 * decl2.c: Likewise.
1097 * parser.c: Likewise.
1098 * cp-objcp-common.c: Likewise.
1099 * cp-tree.h: Likewise.
1100 * name-lookup.c: Likewise.
1102 * name-lookup.h: Likewise.
1103 * config-lang.in: Update paths in gtfiles for files in c-family/.
1104 * Make-lang.in: Likewise.
1106 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1108 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1109 * typeck.c (build_ptrmemfunc): Likewise.
1111 2010-06-04 Jason Merrill <jason@redhat.com>
1113 * typeck2.c (merge_exception_specifiers): Adjust merging of
1114 throw() and noexcept(true).
1116 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1117 using an uninitialized variable.
1119 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1120 (pp_cxx_expression): Likewise.
1122 Implement noexcept-specification (15.4)
1123 * parser.c (cp_parser_exception_specification_opt): Parse it.
1124 Give -Wdeprecated warning about throw() specs.
1125 * pt.c (tsubst_exception_specification): Handle it.
1126 * error.c (dump_exception_spec): Handle it.
1127 (dump_expr): Handle NOEXCEPT_EXPR.
1128 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1129 * typeck.c (comp_except_specs): Handle compatibility rules.
1130 Change exact parm to take an enum.
1131 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1132 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1133 (type_throw_all_p, build_noexcept_spec): New fns.
1134 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1135 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1136 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1137 (noexcept_true_spec, noexcept_false_spec): New macros.
1138 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1139 * search.c (check_final_overrider): Adjust.
1140 * decl.c (check_redeclaration_exception_specification): Adjust.
1141 (use_eh_spec_block): Use type_throw_all_p.
1142 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1143 Give operator new a noexcept-specification in C++0x mode.
1144 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1145 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1147 Implement noexcept operator (5.3.7)
1148 * cp-tree.def (NOEXCEPT_EXPR): New.
1149 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1150 * cp-tree.h: Declare finish_noexcept_expr.
1151 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1152 * pt.c (tsubst_copy_and_build): And tsubst it.
1153 (type_dependent_expression_p): Handle it.
1154 (value_dependent_expression_p): Handle it.
1156 * call.c (build_conditional_expr): Never fold in unevaluated context.
1157 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1158 * semantics.c (simplify_aggr_init_expr): Likewise.
1159 * typeck.c (merge_types): Call merge_exception_specifiers.
1160 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1161 DECL_ANTICIPATED for preferring new type.
1163 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1165 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1168 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1171 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1172 on object for static data members.
1174 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1175 Jason Merrill <jason@redhat.com>
1178 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1179 with the same type, call mark_lvalue_use on both.
1181 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1183 * class.c (struct vtbl_init_data_s): Remove last_init field.
1184 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1186 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1188 (build_vtt): Likewise.
1189 (initialize_vtable): Take a VEC instead of a tree.
1190 (build_vtt_inits): Change return type to void. Take a VEC **
1191 instead of a tree *; accumulate results into said VEC.
1192 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1193 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1194 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1196 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1197 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1199 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1200 rather than tree_cons.
1201 (build_vbase_offset_vtbl_entries): Likewise.
1202 (add_vcall_offset): Likewise.
1203 (build_rtti_vtbl_entries): Likewise.
1204 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1205 * decl.c (initialize_artificial_var): Use build_constructor instead
1206 of build_constructor_from_list.
1208 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1211 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1214 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1216 * parser.c (cp_parser_mem_initializer_list): Change error text.
1218 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1220 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1221 tree_decl_map hashtab from tree_map.
1222 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1223 (init_shadowed_var_for_decl): Adjust initialization.
1226 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1227 instead of calling mark_exp_read only when not an assignment.
1230 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1231 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1232 Set DECL_VALUE_EXPR on var.
1234 2010-06-02 Jason Merrill <jason@redhat.com>
1236 * error.c (dump_type): Improve typedef handling.
1241 * name-lookup.c (same_entity_p): New.
1242 (ambiguous_decl): Multiple declarations of the same entity
1245 2010-06-01 Jason Merrill <jason@redhat.com>
1248 * call.c (add_list_candidates): Prefer the default constructor.
1249 (build_aggr_conv): Treat missing initializers like { }.
1250 * typeck2.c (process_init_constructor_record): Likewise.
1251 * init.c (expand_default_init): Use digest_init for
1252 direct aggregate initialization, too.
1254 * call.c (add_list_candidates): Split out...
1255 (build_user_type_conversion_1): ...from here.
1256 (build_new_method_call): And here.
1257 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1260 * call.c (build_list_conv): Set list-initialization flags properly.
1262 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1264 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1266 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1267 Matthew Gingell <gingell@adacore.com>
1269 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1270 * decl2.c: Include langhooks.h and c-ada-spec.h.
1271 (cpp_check, collect_source_refs, collect_ada_namespace,
1272 collect_all_refs): New functions.
1273 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1274 * lang-specs.h: Ditto.
1276 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1278 * cp-tree.h (cp_build_function_call_nary): Declare.
1279 * typeck.c (cp_build_function_call_nary): Define.
1280 * decl.c (register_dtor_fn): Use it instead of
1281 cp_build_function_call.
1282 (cxx_maybe_build_cleanup): Likewise.
1283 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1284 * except.c (do_get_exception_ptr): Likewise.
1285 (do_begin_catch): Likewise.
1286 (do_allocate_exception): Likewise.
1287 (do_free_exception): Likewise.
1288 (build_throw): Likewise. Use cp_build_function_call_vec instead
1289 of cp_build_function_call.
1290 (do_end_catch): Likewise.
1292 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1294 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1295 (struct cp_declarator): Move id_loc field up.
1297 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1299 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1300 this file is included before c-common.h. Define GCC_DIAG_STYLE
1301 before including diagnostic-core.h and toplev.h.
1302 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1303 * pt.c: Include cp-tree.h before c-common.h.
1305 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1307 * tree.c (c_register_addr_space): Add stub.
1309 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1311 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1314 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1316 Revert fix of PR c++/44188
1317 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1319 * tree.c (typedef_variant_p): Revert moving this definition to
1321 * decl.c (grokdeclarator): Revert naming typedef handling.
1323 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1325 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1326 * cp-lang.c: Don't include diagnostic.h
1327 * name-lookup.c: Include diagnostic-core.h instead of
1329 (cp_emit_debug_info_for_using): Use seen_error.
1330 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1331 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1332 * pt.c (iterative_hash_template_arg): Use seen_error.
1333 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1334 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1335 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1336 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1339 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1342 * cp-tree.h (typedef_variant_p): Move this declaration to
1344 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1345 * decl.c (grokdeclarator): Do not rename debug info of an
1346 anonymous tagged type named by a typedef.
1348 2010-05-27 Jason Merrill <jason@redhat.com>
1351 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1354 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1357 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1358 * class.c (layout_class_type): Likewise.
1359 * decl.c (finish_enum): Likewise.
1360 * mangle.c (write_builitin_type): Likewise.
1362 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1364 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1366 * decl.c (grokdeclarator): Handle __int128.
1367 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1368 (cp_parser_simple_type_specifier): Likewise.
1369 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1370 * typeck.c (cp_common_type): Handle __int128.
1371 * mangle.c (integer_type_codes): Add itk_int128 and
1372 itk_unsigned_int128.
1374 2010-05-26 Jason Merrill <jason@redhat.com>
1377 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1380 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1382 * cp-lang.c: Do not include expr.h.
1384 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1386 * decl.c: Do not include rtl.h
1387 * semantics.c: Likewise.
1389 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1391 * cp-tree.h: Do not include splay-tree.h.
1392 (struct prtmem_cst): Remove unused field and false comment.
1393 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1394 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1395 * init.c: Do not include rtl.h and expr.h.
1396 * class.c: Do not include rtl.h. Include splay-tree.h.
1397 (build_clone): Use plain NULL instead of NULL_RTX.
1398 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1399 included. Include splay-tree.h.
1400 * method.c: Do not include rtl.h and expr.h.
1401 (use_thunk): Use plain NULL instead of NULL_RTX.
1402 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1403 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1404 and target.h. Include splay-tree.h.
1405 * expr.c: Do not include rtl.h and expr.h.
1406 * pt.c: Do not include obstack.h and rtl.h.
1407 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1408 (tsubst_decl): Likewise.
1409 (instantiate_decl): Likewise.
1410 * semantics.c: Do not include exprt.h and debug.h. Explain why
1411 rtl.h has to be included.
1412 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1413 * call.c: Do not include rtl.h and expr.h.
1414 * search.c: Do not include obstack.h and rtl.h.
1415 * friend.c: Do not include rtl.h and expr.h.
1416 * Make-lang.in: Update dependencies.
1418 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1421 * parser.c (non_integral_constant): Add NIC_NONE.
1422 (required_token): Add RT_NONE.
1423 (cp_parser_unary_expression): Initialize non_constant_p
1425 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1426 (cp_parser_primary_expression, cp_parser_postfix_expression,
1427 cp_parser_cast_expression, cp_parser_binary_expression,
1428 cp_parser_functional_cast): Fix formatting.
1430 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1433 * parser.c: Remove inclusion of dyn-string.h.
1434 (non_integral_constant): New enum.
1435 (name_lookup_error): New enum.
1436 (required_token): New enum.
1437 (cp_parser_required_error): New function.
1438 (cp_parser_require): Change the type of variable token_desc to
1439 required_token and use cp_parser_required_error.
1440 (cp_parser_require_keyword): Likewise.
1441 (cp_parser_error): Use gmsgid as parameter.
1442 (cp_parser_name_lookup_error): Change the type of variable desired to
1443 name_lookup_error and put the diagnostic in the full sentences. Change
1445 (cp_parser_non_integral_constant_expression): Change the type of the
1446 variable thing to non_integral_constant and put the diagnostics in
1447 full sentences. Change caller.
1449 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1452 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1454 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1456 * error.c (cp_diagnostic_starter): Update call to
1457 diagnostic_build_prefix.
1458 (cp_print_error_function,
1459 print_instantiation_partial_context_line): Check show_column flag
1462 2010-05-24 Jason Merrill <jason@redhat.com>
1465 * decl.c (check_initializer): Don't wrap an init-list in a
1467 * init.c (build_aggr_init): Don't assume copy-initialization if
1468 init has CONSTRUCTOR_IS_DIRECT_INIT.
1469 * call.c (build_new_method_call): Sanity check.
1471 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1473 * rtti.c (tinfo_base_init): Use build_constructor instead of
1474 build_constructor_from_list. Don't cons a tree node for
1476 (generic_initializer): Use build_constructor_single instead of
1477 build_constructor_from_list.
1478 (ptr_initializer): Use build_constructor instead of
1479 build_constructor_from_list
1480 (ptm_initializer): Likewise.
1481 (class_initializer): Likewise. Take varargs instead of TRAIL.
1482 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1483 build_constructor instead of build_constructor_from_list.
1485 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1487 * semantics.c: Include bitmap.h.
1488 * Make-lang.in: Update dependencies.
1490 2010-05-22 Jan Hubicka <jh@suse.cz>
1492 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1494 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1496 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1498 * cxx-pretty-print.c: Correct merge error.
1500 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1502 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1503 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1504 (cp_printer): Handle %K here using percent_K_format.
1505 * cxx-pretty-print.c: Include tree-pretty-print.h.
1506 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1509 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1511 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
1512 Clean up redundant includes.
1514 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1517 * decl.c (xref_basetypes): Return false in case of ill-formed
1520 2010-05-19 Jason Merrill <jason@redhat.com>
1522 * call.c (reference_binding): Use cp_build_qualified_type_real
1523 and cp_type_quals consistently.
1524 (add_function_candidate): Likewise.
1525 (build_conditional_expr): Likewise.
1526 (convert_like_real): Likewise.
1527 (type_passed_as): Likewise.
1528 * class.c (add_method): Likewise.
1529 (same_signature_p): Likewise.
1530 (layout_class_type): Likewise.
1531 * decl.c (cxx_init_decl_processing): Likewise.
1532 (cp_fname_init): Likewise.
1533 (grokdeclarator): Likewise.
1534 * decl2.c (cp_reconstruct_complex_type): Likewise.
1535 * init.c (build_new_1): Likewise.
1536 * method.c (do_build_copy_constructor): Likewise.
1537 (implicitly_declare_fn): Likewise.
1538 * pt.c (tsubst_aggr_type): Likewise.
1540 * rtti.c (init_rtti_processing): Likewise.
1541 (build_headof): Likewise.
1542 (build_dynamic_cast_1): Likewise.
1543 (tinfo_base_init): Likewise.
1544 (emit_support_tinfos): Likewise.
1545 * semantics.c (capture_decltype): Likewise.
1546 * tree.c (cv_unqualified): Likewise.
1547 * typeck.c (composite_pointer_type): Likewise.
1548 (string_conv_p): Likewise.
1550 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1552 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1553 * decl.c (start_decl): Likewise.
1554 * semantics.c (finish_compound_literal): Likewise.
1555 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1556 (cp_type_readonly): Remove.
1557 * cp-tree.h: Remove declaration.
1559 * typeck.c (merge_types): Preserve memfn quals.
1561 * decl.c (grokdeclarator): Don't check quals on fn type.
1562 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1563 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1566 * typeck.c (type_memfn_quals): New fn.
1567 (apply_memfn_quals): New fn.
1568 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1569 (cp_type_readonly): Use cp_type_quals.
1570 * cp-tree.h: Add declarations.
1571 * tree.c (cp_build_qualified_type_real): Don't set, but do
1572 preserve, quals on FUNCTION_TYPE.
1573 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1574 * decl.c (build_ptrmem_type): Likewise.
1575 (grokdeclarator): Likewise.
1576 (static_fn_type): Likewise.
1577 * decl2.c (change_return_type): Likewise.
1578 (cp_reconstruct_complex_type): Likewise.
1579 * pt.c (tsubst_function_type): Likewise.
1581 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1583 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1585 * tree.c (build_min_non_dep_call_vec): Update comment.
1587 2010-05-17 Jason Merrill <jason@redhat.com>
1589 * call.c (struct z_candidate): Add explicit_targs field.
1590 (add_template_candidate_real): Set it.
1591 (build_over_call): Use it to control init-list warning.
1594 * call.c (build_over_call): Limit init-list deduction warning to
1595 cases where the argument is actually an init-list.
1598 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1600 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1601 Jason Merrill <jason@redhat.com>
1604 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1606 2010-05-15 Jason Merrill <jason@redhat.com>
1608 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1609 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1611 (finish_eh_spec_block): Adjust.
1613 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1616 * pt.c (tsubst): Unshare template argument.
1618 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1620 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1621 * Make-lang.in: Fix dependencies accordingly.
1623 2010-05-14 Jason Merrill <jason@redhat.com>
1626 * except.c (build_throw): Simplify, adjust for DR 475.
1629 * except.c (dtor_nothrow): Return nonzero for type with
1633 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1634 gimple_build_eh_must_not_throw.
1636 2010-05-14 Martin Jambor <mjambor@suse.cz>
1638 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1641 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1643 * call.c (build_new_method_call): Change warning text.
1644 * typeck2.c (build_functional_cast): Change error text.
1646 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1649 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1650 shadowing the outer parameter or variables by the declaration of
1651 nested function in nested structure or class. Warn the shadowing by
1652 the declaration of nested lambda expression.
1654 2010-05-13 Jason Merrill <jason@redhat.com>
1656 * typeck.c (cp_build_array_ref): Factor out from...
1657 (build_array_ref): ...here. Drop complain parm.
1658 (build_new_op): Adjust.
1659 * class.c (build_vtbl_ref_1): Adjust.
1660 * decl2.c (grok_array_decl): Adjust.
1661 * cp-tree.h: Adjust prototypes.
1663 2010-05-13 Jan Hubicka <jh@suse.cz>
1665 * decl.c (cp_finish_decl): Do not worry about used attribute.
1667 2010-05-12 Jason Merrill <jason@redhat.com>
1669 * typeck.c (build_array_ref): Take complain parm.
1670 * cp-tree.h: Add it to prototype.
1671 * call.c (build_new_op): Pass it.
1672 * class.c (build_vtbl_ref): Pass it.
1673 * decl2.c (grok_array_decl): Pass it.
1677 * cp-tree.def (NULLPTR_TYPE): Remove.
1678 * cp-tree.h (NULLPTR_TYPE_P): New.
1679 (SCALAR_TYPE_P): Use it.
1680 (nullptr_type_node): New.
1681 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1682 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1684 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1685 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1686 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1687 * mangle.c (write_type): Likewise.
1688 * name-lookup.c (arg_assoc_type): Likewise.
1689 * typeck.c (build_reinterpret_cast_1): Likewise.
1690 * rtti.c (typeinfo_in_lib_p): Likewise.
1691 (emit_support_tinfos): Remove local nullptr_type_node.
1693 * cp-tree.h (UNKNOWN_TYPE): Remove.
1694 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1695 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1696 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1697 * class.c (instantiate_type): Check unknown_type_node rather than
1699 * name-lookup.c (maybe_push_decl): Likewise.
1700 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1701 (get_typeid): Likewise.
1702 * semantics.c (finish_offsetof): Likewise.
1705 * call.c (add_template_candidate_real): If deduction fails, still
1706 add the template as a non-viable candidate.
1707 (equal_functions): Handle template candidates.
1708 (print_z_candidate): Likewise.
1709 (print_z_candidates): Likewise.
1710 (build_new_function_call): Likewise.
1712 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1713 * call.c (add_candidates): Enforce it.
1714 (build_new_method_call): Try non-list ctor if no viable list ctor.
1715 (build_user_type_conversion_1): Likewise.
1717 * call.c (add_candidates): Distinguish between type(x) and
1719 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1720 (build_new_method_call): Give better error for conversion op.
1722 * call.c (add_candidates): Add first_arg and return_type parms.
1723 Add special constructor/conversion op handling.
1724 (convert_class_to_reference): Use it.
1725 (build_user_type_conversion_1): Likewise.
1726 (build_op_call): Likewise.
1727 (build_new_method_call): Likewise.
1728 (build_new_op): Adjust.
1729 (perform_overload_resolution): Adjust.
1731 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1736 * pt.c (process_partial_specialization): Return error_mark_node
1737 in case of unused template parameters in partial specialization.
1739 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1742 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1743 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1744 look at its second operand.
1746 2010-05-10 Jason Merrill <jason@redhat.com>
1749 * semantics.c (baselink_for_fns): Revert earlier change.
1752 * typeck.c (cp_build_modify_expr): Complain about assignment to
1753 array from init list.
1755 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1758 * decl.c (check_initializer): strip array type before checking for
1759 uninitialized const or ref members.
1761 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1764 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1765 error count. Emit errors only if compain is true.
1766 (build_new_1): Do not return error_mark_node if
1767 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1768 errors. Delay the check for user-provided constructor.
1769 (perform_member_init): Adjust.
1770 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1773 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1774 Jason Merrill <jason@redhat.com>
1776 Add support for C++0x nullptr.
1777 * cp-tree.def: Add NULLPTR_TYPE.
1778 * cp-tree.h: Add nullptr_node.
1779 (cp_tree_index): Add CPTI_NULLPTR.
1780 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1781 * call.c (null_ptr_cst_p): Handle nullptr.
1782 (standard_conversion): Likewise.
1783 (convert_arg_to_ellipsis): Likewise.
1784 * mangle.c (write_type): Likewise.
1785 * name-lookup.c (arg_assoc_type): Likewise.
1786 * parser.c (cp_parser_primary_expression): Likewise.
1787 * typeck.c (cp_build_binary_op): Likewise.
1788 (build_reinterpret_cast_1): Likewise.
1789 * error.c (dump_type): Likewise.
1790 (dump_type_prefix, dump_type_suffix): Likewise.
1791 * decl.c (cxx_init_decl_processing): Likewise.
1792 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1793 * cvt.c (ocp_convert): Likewise.
1794 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1795 nullptr_t tinfo in libsupc++.
1797 2010-05-06 Jason Merrill <jason@redhat.com>
1799 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1801 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1802 Dodji Seketeli <dodji@redhat.com>
1805 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1807 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1808 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1809 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1810 (cp_build_unary_op): Call lvalue_use.
1811 * decl.c (unused_but_set_errorcount): New variable.
1812 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1813 (duplicate_decls): Merge DECL_READ_P flags.
1814 (start_cleanup_fn): Set DECL_READ_P flag.
1815 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1816 * tree.c (rvalue): Call rvalue_use.
1817 * pt.c (convert_nontype_argument): Likewise.
1818 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1819 finish_decltype_type): Likewise.
1820 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1821 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1822 or rvalue_use depending on the expr.
1823 * init.c (build_new, build_delete): Likewise.
1824 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1826 2010-05-05 Jason Merrill <jason@redhat.com>
1829 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1830 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1832 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1835 * pt.c (unify): Check each elt for error_mark_node.
1837 2010-05-04 Jason Merrill <jason@redhat.com>
1840 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1842 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1845 * call.c (build_new_method_call): Return error_mark_node if fns is
1848 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1851 * pt.c (most_specialized_class): Pretend we are processing
1852 a template decl during the call to coerce_template_parms.
1854 2010-05-03 Jason Merrill <jason@redhat.com>
1858 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1859 from the selected underlying type unless -fstrict-enums. Set
1860 ENUM_UNDERLYING_TYPE to have the restricted range.
1861 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
1862 * class.c (check_bitfield_decl): Likewise.
1864 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
1867 * init.c (build_new_1): Revert the accidental checkin in
1870 2010-04-30 Jason Merrill <jason@redhat.com>
1873 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
1874 (pp_cxx_type_specifier_seq): ...here.
1876 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1878 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
1879 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1881 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
1884 * typeck.c (warn_args_num): New function.
1885 (convert_arguments): Use warn_args_num to print the diagnostic
1888 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
1891 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1892 user-provided constructor while recursing.
1894 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
1897 * error.c (print_instantiation_partial_context_line): Handle
1898 recursive instantiation.
1899 (print_instantiation_partial_context): Likewise.
1901 2010-04-27 Jason Merrill <jason@redhat.com>
1903 * init.c (perform_member_init): Check CLASS_TYPE_P.
1905 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1908 * init.c (perform_member_init): check for uninitialized const or
1909 reference members, including array types.
1911 2010-04-24 Jason Merrill <jason@redhat.com>
1913 * tree.c (get_fns): Split out from get_first_fn.
1914 * cp-tree.h: Declare it.
1915 * search.c (shared_member_p): Use it.
1916 * semantics.c (finish_qualified_id_expr): Simplify.
1917 (finish_id_expression): Simplify.
1919 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1920 whenever object is NULL_TREE. Don't do 'this' capture here.
1921 (finish_qualified_id_expr): Pass NULL_TREE.
1922 (finish_id_expression): Likewise.
1923 (lambda_expr_this_capture): Likewise.
1925 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1926 rather than checking current_class_ref directly.
1927 (finish_call_expr): Likewise.
1930 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1931 * class.c (current_nonlambda_class_type): New fn.
1932 * semantics.c (nonlambda_method_basetype): New.
1933 * cp-tree.h: Declare them.
1934 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1936 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1939 * semantics.c (lambda_return_type): Complain about
1943 * tree.c (cv_unqualified): Handle error_mark_node.
1946 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1947 if we don't want errors.
1950 * class.c (convert_to_base): Add complain parameter. Pass
1951 ba_quiet to lookup_base if we don't want errors.
1952 (build_vfield_ref): Pass complain to convert_to_base.
1953 * call.c (convert_like_real): Likewise.
1954 (initialize_reference): Likewise.
1955 (perform_direct_initialization_if_possible): Pass complain to
1957 * cp-tree.h: Adjust.
1959 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1960 Jason Merrill <jason@redhat.com>
1963 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1965 (check_initializer): Call it for classes that need constructing, too.
1966 * class.c (in_class_defaulted_default_constructor): New.
1967 * cp-tree.h: Declare it.
1969 2010-04-20 Jason Merrill <jason@redhat.com>
1972 * init.c (constant_value_1): Treat error_mark_node as a constant
1973 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1974 * cvt.c (ocp_convert): Handle getting error_mark_node from
1975 integral_constant_value.
1976 * decl.c (compute_array_index_type): Likewise.
1978 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1982 * typeck.c (incompatible_dependent_types_p): If one of the
1983 compared types if not a typedef then honour their main variant
1986 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1988 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1990 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1993 * typeck.c (structural_comptypes): Test dependent typedefs
1994 incompatibility before testing for their main variant based
1997 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1999 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2000 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2002 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2004 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2005 build_common_tree_nodes.
2007 2010-04-14 Jason Merrill <jason@redhat.com>
2010 * parser.c (cp_parser_parenthesized_expression_list): Change
2011 is_attribute_list parm to int to indicate whether or not to
2012 handle initial identifier specially.
2013 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2015 2010-04-13 Jason Merrill <jason@redhat.com>
2017 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2019 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2020 unevaluated context.
2021 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2023 2010-04-12 Jason Merrill <jason@redhat.com>
2026 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2027 return value directly.
2029 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2031 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2034 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2035 * init.c (build_new_1): Check for uninitialized const members and
2036 uninitialized reference members, when using new without
2037 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2038 (diagnose_uninitialized_cst_or_ref_member): Define, call
2039 diagnose_uninitialized_cst_or_ref_member_1.
2040 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2042 2010-04-12 Richard Guenther <rguenther@suse.de>
2045 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2046 template inline functions.
2048 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2051 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2054 2010-04-07 Jason Merrill <jason@redhat.com>
2057 * decl.c (start_preparsed_function): Do defer nested functions.
2059 PR c++/11094, DR 408
2060 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2061 * decl2.c (finish_static_data_member_decl): Set it.
2062 * decl.c (duplicate_decls): Propagate it.
2063 * pt.c (tsubst_decl): Don't substitute the domain of an array
2064 VAR_DECL if it's set.
2065 (regenerate_decl_from_template): Substitute it here.
2066 (type_dependent_expression_p): Return true if it's set.
2067 * semantics.c (finish_decltype_type): Instantiate such a variable.
2068 * typeck.c (cxx_sizeof_expr): Likewise.
2069 (strip_array_domain): New.
2072 * name-lookup.c (current_decl_namespace): Non-static.
2073 (pop_nested_namespace): Sanity check.
2074 * cp-tree.h: Declare current_decl_namespace.
2075 * decl.c (grokvardecl): Use it instead of current_namespace.
2076 (grokfndecl): Likewise.
2079 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2082 * pt.c (print_template_statistics): New.
2083 * cp-tree.h: Declare it.
2084 * tree.c (cxx_print_statistics): Call it.
2087 * decl.c (grokvardecl): Tweak warning message.
2088 (grokfndecl): Likewise.
2090 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2093 *pt.c (tsubst_decl): Get the arguments of a specialization from
2094 the specialization template, not from the most general template.
2096 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2099 * typeck2.c (process_init_constructor_record):
2100 value-initialize members that are are not explicitely
2103 2010-04-07 Jie Zhang <jie@codesourcery.com>
2106 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2107 when all of its elements are non-constant and have been split out.
2109 2010-04-06 Taras Glek <taras@mozilla.com>
2110 Jason Merrill <jason@redhat.com>
2112 * parser.c (cp_parser_class_specifier): Set class location to that
2113 of IDENTIFIER_NODE instead of '{' when possible.
2114 * semantics.c (begin_class_definition): Do not overide locations
2115 with less precise ones.
2117 2010-04-06 Jason Merrill <jason@redhat.com>
2120 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2123 * pt.c (maybe_update_decl_type): Check the return value from
2126 2010-04-01 Jason Merrill <jason@redhat.com>
2128 * decl.c (next_initializable_field): No longer static.
2129 * cp-tree.h: Declare it.
2130 * call.c (build_aggr_conv): Fail if there are more initializers
2131 than initializable fields.
2133 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2134 instead of void_zero_node.
2136 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2139 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2140 * pt.c (end_template_parm_list): Store sibling template parms of
2141 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2142 (push_template_decl_real): Don't store the containing template decl
2143 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2144 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2145 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2148 2010-03-30 Jason Merrill <jason@redhat.com>
2151 * pt.c (push_template_decl_real): Deal better with running out of
2152 scopes before running out of template parms.
2156 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2157 function parameter context. Don't print an error if parsing
2161 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2164 2010-03-26 Jason Merrill <jason@redhat.com>
2167 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2168 c++0x mode, but not other type-names.
2170 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2173 * pt.c (add_to_template_args): Support NULL ARGS;
2174 (most_specialized_class): call coerce_template_parms on
2175 template arguments passed to get_class_bindings. Use
2176 add_to_template_args.
2177 (unify): Handle VAR_DECLs.
2179 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2181 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2183 * pt.c (get_template_parms_at_level): Adjust.
2185 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2188 * cp-tree.h (get_template_parms_at_level): Declare ...
2189 * pt.c (get_template_parms_at_level): ... new function.
2190 * typeck.c (get_template_parms_of_dependent_type): If a template
2191 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2192 current_template_parms. Use get_template_parms_at_level. Remove
2194 (incompatible_dependent_types_p): If we get empty parms from just one
2195 of the template type parms we are comparing then the template parms are
2198 2010-03-24 Jason Merrill <jason@redhat.com>
2201 * parser.c (make_declarator): Initialize id_loc.
2202 (cp_parser_lambda_declarator_opt): And set it.
2204 2010-03-23 Jason Merrill <jason@redhat.com>
2206 Make lambda conversion op and op() non-static.
2207 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2208 Also add the thunk function returned by the conversion op.
2209 Mark the conversion deleted if the op() is variadic.
2210 * decl2.c (mark_used): Give helpful message about deleted conversion.
2211 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2212 * semantics.c (finish_this_expr): Adjust.
2213 * mangle.c (write_closure_type_name): Adjust.
2214 * decl.c (grok_op_properties): Don't allow it.
2215 * call.c (build_user_type_conversion_1): No static conversion ops.
2216 (build_op_call): Or op().
2218 * decl2.c (change_return_type): Fix 'this' quals.
2220 2010-03-22 Jason Merrill <jason@redhat.com>
2223 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2226 * pt.c (contains_auto_r): New fn.
2227 (do_auto_deduction): Use it.
2228 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2230 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2233 * decl2.c (grokfield): Handle invalid initializers for member
2236 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2239 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2241 * decl2.c (vague_linkage_p): Likewise.
2243 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2246 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2247 false, in the cp_parser_expression_statement call.
2249 2010-03-05 Jason Merrill <jason@redhat.com>
2251 * mangle.c (mangle_decl): Give name collision error even without
2254 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2256 * pt.c (process_partial_specialization): Use error_n instead of
2259 2010-03-03 Jason Merrill <jason@redhat.com>
2262 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2264 2010-03-03 Jason Merrill <jason@redhat.com>
2267 * mangle.c: Include cgraph.h.
2268 (mangle_decl): If the mangled name will change in a later
2269 ABI version, make the later mangled name an alias.
2270 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2271 * Make-lang.in (mangle.o): Depend on cgraph.h.
2272 * method.c (make_alias_for): Handle VAR_DECL, too.
2273 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2274 * tree.c (no_linkage_check): Adjust.
2275 * decl.c (maybe_commonize_var): Adjust.
2276 * cp-tree.h: Adjust.
2278 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2280 * pt.c (redeclare_class_template): Use error_n and inform_n.
2282 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2285 * cp-tree.h (push_tinst_level): Declare.
2286 (pop_tinst_level): Likewise.
2287 * pt.c (push_tinst_level): Give it external linkage.
2288 (pop_tinst_level): Likewise.
2289 * mangle.c (mangle_decl_string): Set the source location to that
2290 of the decl while mangling.
2292 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2295 * pt.c (redeclare_class_template): Return false if there are erroneous
2296 template parameters.
2298 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2300 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2303 2010-02-24 Jason Merrill <jason@redhat.com>
2306 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2308 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2309 in a previous ABI version.
2311 2010-02-23 Jason Merrill <jason@redhat.com>
2314 * typeck2.c (digest_init_r): Accept value init of array.
2316 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2319 * typeck.c (convert_arguments): Update error message.
2321 2010-02-22 Mike Stump <mikestump@comcast.net>
2324 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2326 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2329 * error.c (print_instantiation_partial_context_line): New.
2330 (print_instantiation_partial_context): Print at most 12 contexts,
2331 skip the rest with a message.
2333 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2336 * pt.c (lookup_template_class): Better support of specialization
2337 of member of class template implicit instantiation.
2339 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2342 * call.c (conversion_null_warnings): Replace -Wconversion with
2344 * cvt.c (build_expr_type_conversion): Likewise.
2346 2010-02-18 Jason Merrill <jason@redhat.com>
2349 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2352 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2354 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2355 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2358 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2362 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2363 (maybe_update_decl_type): New fn.
2364 * parser.c (cp_parser_init_declarator): Use it.
2367 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2369 2010-02-17 Jason Merrill <jason@redhat.com>
2372 * call.c (build_over_call): Don't create zero-sized assignments.
2373 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2374 * cp-objcp-common.c (cp_expr_size): Remove.
2375 * cp-tree.h: Remove prototype.
2378 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2379 decl we looked up doesn't match.
2382 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2383 have an INIT_EXPR anymore.
2386 * pt.c (convert_nontype_argument): Change assert to test.
2388 2010-02-16 Jason Merrill <jason@redhat.com>
2390 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2393 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2394 VIEW_CONVERT_EXPR for conversions between structural equality types
2395 that the back end can't tell are the same.
2398 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2399 cv-quals from element here.
2400 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2402 2010-02-14 Jason Merrill <jason@redhat.com>
2405 * semantics.c (finish_compound_literal): Use
2406 cp_apply_type_quals_to_decl when creating a static variable.
2408 2010-02-12 Jason Merrill <jason@redhat.com>
2411 * name-lookup.h (current_binding_level): Check for null
2414 2010-02-12 Jason Merrill <jason@redhat.com>
2417 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2419 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2422 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2425 2010-02-10 Jason Merrill <jason@redhat.com>
2428 * semantics.c (outer_lambda_capture_p): Revert.
2429 (add_capture): Only finish_member_declaration if
2430 we're in the lambda class.
2431 (register_capture_members): New.
2432 * cp-tree.h: Declare it.
2433 * parser.c (cp_parser_lambda_expression): Call it.
2435 2010-02-10 Jason Merrill <jason@redhat.com>
2438 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2439 instead of current_class_type.
2441 2010-02-10 Jason Merrill <jason@redhat.com>
2443 PR c++/42983, core issue 906
2444 * method.c (defaultable_fn_check): Check virtualness.
2446 2010-02-10 Jason Merrill <jason@redhat.com>
2449 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2451 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2453 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2454 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2456 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2457 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2458 (cp_parser_parameter_declaration)
2459 (cp_parser_exception_specification_opt)
2460 (cp_parser_exception_declaration): Likewise.
2461 * pt.c (check_default_tmpl_args): Likewise.
2462 * search.c (lookup_field_r): Likewise.
2464 2010-02-09 Jason Merrill <jason@redhat.com>
2467 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2469 2010-02-09 Jason Merrill <jason@redhat.com>
2472 * decl2.c (change_return_type): New fn.
2473 * semantics.c (apply_lambda_return_type): Use it.
2474 * cp-tree.h: Declare it.
2476 2010-02-05 Richard Guenther <rguenther@suse.de>
2478 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2479 * cp-lang.c: Include gt-cp-cp-lang.h.
2480 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2482 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2485 * typeck.c (get_template_parms_of_dependent_type): Try getting
2486 the template parameters fromt the type itself first.
2488 2010-02-03 Jason Merrill <jason@redhat.com>
2492 * mangle.c (write_unqualified_id): Split out from write_expression.
2493 (write_unqualified_name): Call it.
2494 (write_member_name): Likewise.
2495 (write_expression): Support TEMPLATE_ID_EXPR.
2496 Disambiguate operator names.
2499 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2502 2010-02-02 Jason Merrill <jason@redhat.com>
2505 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2506 * optimize.c (clone_body): Remap their initializers when making base
2508 (maybe_clone_body): Complain if multiple clones aren't safe.
2510 2010-01-29 Dodji Seketeli <dodji@redhat.com>
2517 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2518 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2519 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
2520 * pt.c (coerce_template_parms, type_unification_real,
2521 expand_template_argument_pack, coerce_template_parameter_pack):
2522 Set the non default template args count.
2523 (current_template_args): Always set non defaulted
2524 template args count when compiled with --enable-checking
2525 (tsubst_template_args, type_unification_real): Propagate the non
2526 defaulted template args count.
2527 * error.c (get_non_default_template_args_count): Renamed
2528 count_non_default_template_args into this. Don't calculate the
2529 non default template argument count anymore. Use the new
2530 accessor macros above to get it.
2531 (dump_template_argument_list, dump_type, dump_decl,
2532 dump_template_parms): Adjust.
2533 * parser.c (cp_parser_template_argument_list): Always set defaulted
2534 template args count when compiled with --enable-checking.
2536 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2538 * decl.c (redeclaration_error_message): Wrap the return messages into
2539 G_() for easy translation.
2541 2010-01-28 Jason Merrill <jason@redhat.com>
2544 * semantics.c (begin_class_definition): Don't use type_as_string.
2546 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2550 * typeck.c (get_template_parms_of_dependent_type): Factorized
2551 this out of incompatible_template_type_parms_p
2552 (incompatible_dependent_types_p): Renamed
2553 incompatible_template_type_parms_p into this. Make it detect
2554 two incompatible dependent typedefs too.
2555 (structural_comptypes): Use incompatible_dependent_types_p.
2556 * pt.c (get_template_info):
2557 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2559 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2560 Jason Merrill <jason@redhat.com>
2562 * mangle.c (write_type): Mangle transparent record as member type.
2563 * semantics.c (begin_class_definition): Recognize decimal classes
2564 and set TYPE_TRANSPARENT_AGGR.
2566 2010-01-20 Jason Merrill <jason@redhat.com>
2569 * mangle.c (write_expression): Handle tree codes that have extra
2570 arguments in the middle-end.
2572 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2575 * except.c (expand_start_catch_block): Deal correctly with
2576 do_begin_catch returning error_mark_node.
2578 2010-01-20 Jason Merrill <jason@redhat.com>
2581 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2585 * semantics.c (build_lambda_object): Call mark_used on captured
2589 * decl.c (grokdeclarator): Clear type_quals for a member function
2590 declared using a typedef. Don't complain about adding cv-quals
2591 to a function typedef in C++0x mode.
2593 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2595 * decl.c (create_array_type_for_decl): Remove set but not used
2596 variable error_msg. Remove break stmts after return stmts.
2598 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2600 * error.c (dump_template_parms, count_non_default_template_args):
2601 Revert fix of PR c++/42634.
2603 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2606 * error.c (dump_template_parms): Use innermost template
2607 arguments before calling count_non_default_template_args.
2608 (count_non_default_template_args): We are being called with
2609 template innermost arguments now. There is no need to ensure
2612 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2615 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2617 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2620 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2622 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2625 *pt.c (tsubst_decl): Get the arguments of a specialization from
2626 the specialization template, not from the most general template.
2628 2010-01-16 Jason Merrill <jason@redhat.com>
2631 * semantics.c (finish_decltype_type): Within a template, treat
2632 unresolved CALL_EXPR as dependent.
2634 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2636 * error.c (dump_template_parms,count_non_default_template_args):
2637 Revert changes of PR c++/42634.
2639 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2642 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2643 functions with noreturn attribute.
2645 2010-01-14 Jason Merrill <jason@redhat.com>
2648 * call.c (build_new_method_call): Don't free the vec here.
2651 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2653 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2656 * error.c (dump_template_parms): Use innermost template
2657 arguments before calling count_non_default_template_args.
2658 (count_non_default_template_args): We are being called with
2659 template innermost arguments now. There is no need to ensure
2662 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2665 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2666 arguments that were previously deduced.
2668 2010-01-05 Jason Merrill <jason@redhat.com>
2670 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2671 * call.c (build_over_call): Don't complain about it.
2673 2010-01-04 Jason Merrill <jason@redhat.com>
2676 * pt.c (tsubst_decl): Don't apply type attributes in place.
2679 * semantics.c (describable_type): Remove decltype comment and
2684 Copyright (C) 2010 Free Software Foundation, Inc.
2686 Copying and distribution of this file, with or without modification,
2687 are permitted in any medium without royalty provided the copyright
2688 notice and this notice are preserved.