1 2013-10-16 Release Manager
5 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
8 * semantics.c (begin_lambda_type): Check return value of xref_tag
9 for error_mark_node; tidy.
10 * decl.c (grokdeclarator): Tweak error message.
12 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
15 * parser.c (cp_parser_function_specifier_opt): Upon error about
16 virtual templates don't set ds_virtual.
18 2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
21 * class.c (instantiate_type): Loosen a bit the gcc_assert.
23 2013-09-13 Jason Merrill <jason@redhat.com>
26 * pt.c (any_type_dependent_elements_p): Actually check for
27 type-dependence, not value-dependence.
29 2013-09-09 Jakub Jelinek <jakub@redhat.com>
32 * init.c (build_vec_delete): Call mark_rvalue_use on base.
34 2013-08-20 Jason Merrill <jason@redhat.com>
37 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
38 (MAYBE_CLASS_TYPE_P): ...here.
39 * cvt.c (build_expr_type_conversion): Don't complain about a
40 template that can't match the desired type category.
42 2013-08-17 Jason Merrill <jason@redhat.com>
45 * name-lookup.c (push_class_level_binding_1): It's OK to push a
46 lambda type after the enclosing type is complete.
48 2013-08-06 Jason Merrill <jason@redhat.com>
51 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
53 2013-07-29 Jason Merrill <jason@redhat.com>
56 * semantics.c (build_data_member_initialization, constexpr_fn_retval):
57 Use break_out_target_exprs instead of unshare_expr.
60 * typeck2.c (abstract_virtuals_error_sfinae): Don't remember
61 lookup in SFINAE context.
63 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
66 * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
68 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
69 * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
70 a tsubst_flags_t parameter.
71 (tsubst_decl): Adjust.
72 * call.c (convert_default_arg): Likewise.
73 * cp-tree.h (check_default_argument, tsubst_default_argument):
76 2013-07-12 Jason Merrill <jason@redhat.com>
78 * init.c (build_vec_init): Value-initialize the rest of the array.
80 2013-07-09 Jason Merrill <jason@redhat.com>
83 * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
84 if the variable type uses 'auto'.
87 * typeck.c (check_return_expr): Lambda proxies aren't eligible
88 for nrv or return by move.
91 * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
92 a ref-qualifier in C++98 mode.
95 * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
96 argument to have the exact type of the parameter.
99 * semantics.c (cxx_eval_indirect_ref): Don't try to look through
100 a POINTER_PLUS_EXPR for type punning diagnostic.
103 * pt.c (tsubst_copy): Handle USING_DECL.
105 2013-07-08 Jason Merrill <jason@redhat.com>
108 * pt.c (fn_type_unification): Only defer during substitution.
109 (type_unification_real): Defer during defarg substitution,
110 add checks parm to pass back deferred checks.
111 (unify, do_auto_deduction): Adjust.
112 * semantics.c (reopen_deferring_access_checks): New.
113 * cp-tree.h: Declare it.
115 2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
118 * class.c (deduce_noexcept_on_destructors): Save, set, and restore
119 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
122 2013-07-03 Jakub Jelinek <jakub@redhat.com>
125 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
126 Temporarily set parser->greater_than_is_operator_p for
127 cp_parser_expression and restore from saved value afterwards.
129 2013-06-21 Paolo Carlini <paolo.carlini@oracle.com>
132 * pt.c (type_dependent_expression_p): Handle an array of unknown
133 bound depending on a variadic parameter.
134 * parser.c (cp_parser_range_for): Revert PR56794 changes.
136 2013-05-31 Jason Merrill <jason@redhat.com>
139 * class.c (vbase_has_user_provided_move_assign): New.
140 * method.c (synthesized_method_walk): Check it.
141 * cp-tree.h: Declare it.
144 * call.c (convert_like_real): Use cp_convert_and_check.
145 * cvt.c (cp_convert_and_check): Use maybe_constant_value.
146 * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
147 (potential_constant_expression_1): Handle OMP_ATOMIC*.
149 2013-05-31 Release Manager
151 * GCC 4.8.1 released.
153 2013-05-24 Jason Merrill <jason@redhat.com>
156 * tree.c (build_ref_qualified_type): Clear
157 FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
160 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
163 2013-05-20 Jason Merrill <jason@redhat.com>
166 * tree.c (build_cplus_array_type): Copy layout info if element
170 * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
171 whether a template has its own args.
173 2013-05-16 Jason Merrill <jason@redhat.com>
176 * decl.c (grokdeclarator): Allow member function qualifiers in
177 TYPENAME context in C++11 mode.
179 2013-05-16 Dodji Seketeli <dodji@redhat.com>
181 PR c++/56782 - Regression with empty pack expansions
182 * pt.c (use_pack_expansion_extra_args_p): When at least a
183 parameter pack has an empty argument pack, and another parameter
184 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
187 2013-05-14 Jason Merrill <jason@redhat.com>
190 * parser.c (cp_parser_range_for): Call complete_type.
193 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
195 2013-05-13 Jason Merrill <jason@redhat.com>
198 * semantics.c (potential_constant_expression_1): Make sure the
199 called function is potentially constant.
202 * decl.c (reshape_init_class): Handle error_mark_node.
205 * typeck.c (merge_types): Propagate ref-qualifier
209 * decl.c (grokdeclarator): Apply ref-qualifier
210 in the TYPENAME case.
213 * decl.c (decls_match): Compare ref-qualifiers.
216 * pt.c (convert_template_argument): Use dependent_template_arg_p,
217 not uses_template_parms.
219 2013-05-10 Jason Merrill <jason@redhat.com>
222 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
224 2013-05-09 Jason Merrill <jason@redhat.com>
227 * pt.c (lookup_template_class_1): Handle getting a template
228 template parameter as D1.
230 2013-05-08 Jason Merrill <jason@redhat.com>
233 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
234 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
235 * error.c (maybe_warn_cpp0x): s/0x/11/.
237 2013-05-08 Marc Glisse <marc.glisse@inria.fr>
239 * typeck.c (cp_build_binary_op): Call save_expr before
240 build_vector_from_val.
242 2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
245 * decl.c (cp_finish_decl): After do_auto_deduction copy the
246 qualifers with cp_apply_type_quals_to_decl.
248 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
251 * semantics.c (finish_decltype_type): Handle instantiated template
254 2013-04-29 Paolo Carlini <paolo.carlini@oracle.com>
257 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
259 2013-04-25 Jason Merrill <jason@redhat.com>
262 * call.c (add_function_candidate): Strip ref-to-ptr conversion.
265 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
268 * init.c (perform_member_init): Call reshape_init.
270 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
273 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
274 * semantics.c (finish_qualified_id_expr): Likewise.
275 (finish_id_expression): Update.
276 * typeck.c (cp_build_addr_expr_1): Likewise.
277 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
278 * cp-tree.h: Update declarations.
280 2013-04-17 Jason Merrill <jason@redhat.com>
283 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
284 template specializations.
286 2013-04-15 Jason Merrill <jason@redhat.com>
289 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
290 rather than a destructor name, it isn't an unqualified-name.
291 (tsubst_copy_and_build): Pass down decltype_flag to operator
295 * semantics.c (insert_capture_proxy): Just use index 1 in the
298 2013-04-11 Jason Merrill <jason@redhat.com>
301 * parser.c (complain_flags): New.
302 (cp_parser_postfix_expression): Use it.
303 (cp_parser_unary_expression): Likewise.
304 (cp_parser_binary_expression): Likewise.
305 (cp_parser_assignment_expression): Likewise.
306 (cp_parser_expression): Likewise.
307 (cp_parser_postfix_open_square_expression): Take decltype_p.
308 (cp_parser_builtin_offsetof): Adjust.
309 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
310 * decl2.c (grok_array_decl): Add decltype_p parm.
311 * cp-tree.h: Adjust prototype.
312 * semantics.c (finish_unary_op_expr): Add complain parm.
314 2013-04-11 Jakub Jelinek <jakub@redhat.com>
317 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
318 calling maybe_constant_value for C++98.
320 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
323 * typeck2.c (build_m_component_ref): Protect error calls with
324 (complain & tf_error).
326 2013-04-10 Jakub Jelinek <jakub@redhat.com>
329 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
330 first before calling maybe_constant_value for warn_for_div_by_zero
331 or invalid shift count warning purposes.
333 2013-04-06 Jason Merrill <jason@redhat.com>
335 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
338 2013-04-03 Jason Merrill <jason@redhat.com>
340 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
341 (FUNCTION_REF_QUALIFIED): Use FUNC_OR_METHOD_CHECK instead.
342 (FUNCTION_RVALUE_QUALIFIED): Likewise.
344 2013-04-03 Jakub Jelinek <jakub@redhat.com>
347 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
348 from args to new_args.
349 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
350 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
352 2013-04-02 Jason Merrill <jason@redhat.com>
355 * mangle.c (write_function_type): Mangle ref-qualifier.
356 (write_nested_name): Likewise.
357 (canonicalize_for_substitution): Preserve ref-qualifier.
358 (write_type): Likewise.
360 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
363 * decl.c (check_array_designated_initializer): Handle CONST_DECL
366 2013-04-01 Jason Merrill <jason@redhat.com>
369 * init.c (build_new): Don't try to process an array initializer
370 at template definition time.
372 2013-04-01 Jason Merrill <jason@redhat.com>
375 * typeck.c (finish_class_member_access_expr): Handle enum scope.
377 2013-04-01 Jason Merrill <jason@redhat.com>
380 * parser.c (cp_parser_range_for): Don't try to do auto deduction
381 in a template if the type of the range is incomplete.
383 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
384 Jason Merrill <jason@redhat.com>
386 Implement N2439 (ref-qualifiers for 'this')
387 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
388 (FUNCTION_RVALUE_QUALIFIED): New.
389 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
390 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
391 (cp_ref_qualifier): New enum.
392 (cp_declarator): Add ref_qualifier.
393 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
394 (cp_parser_direct_declarator): Use it.
395 (make_call_declarator): Adjust.
396 (cp_parser_lambda_declarator_opt): Adjust.
397 * call.c (add_function_candidate): Handle ref-qualifier overload
398 resolution semantics.
399 (standard_conversion): Adjust.
400 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
401 * decl.c (grokdeclarator): Handle ref-qualifiers.
402 (grokfndecl): Check for invalid ref-qualifiers.
403 (static_fn_type, revert_static_member_fn): Adjust.
404 * decl2.c (build_memfn_type): Handle ref-qualifiers.
405 (check_classfn): Check them.
406 (cp_reconstruct_complex_type): Retain them.
407 * error.c (dump_ref_qualifier): New.
408 (dump_type_suffix, dump_function_decl): Use it.
409 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
410 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
411 (unify): Retain them.
412 * tree.c (cp_check_qualified_type): New.
413 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
414 (build_ref_qualified_type): New.
415 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
416 (cp_build_type_attribute_variant): Keep ref-qualifier.
417 * typeck.c (merge_types): Keep ref-qualifier.
418 (structural_comptypes): Compare ref-qualifier.
419 (type_memfn_rqual): New.
420 (apply_memfn_quals): Take ref-qual argument.
421 * typeck2.c (build_m_component_ref): Check ref-qualifier.
423 2013-03-29 Jason Merrill <jason@redhat.com>
427 * pt.c (unify_pack_expansion): Fix indexing.
429 2013-03-28 Jason Merrill <jason@redhat.com>
432 * semantics.c (cxx_eval_indirect_ref): Use the folded operand if
433 we still think this might be constant.
435 2013-03-27 Jason Merrill <jason@redhat.com>
438 * semantics.c (finish_qualified_id_expr): Return early
441 2013-03-26 Jason Merrill <jason@redhat.com>
444 * typeck2.c (build_m_component_ref): Handle prvalue object.
446 2013-03-25 Jason Merrill <jason@redhat.com>
449 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
450 class is derived from the type of the object.
453 * search.c (lookup_base): Handle NULL_TREE.
455 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
458 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
459 DECL_TEMPLATE_INSTANTIATION.
461 2013-03-25 Jason Merrill <jason@redhat.com>
464 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
467 2013-03-23 Jason Merrill <jason@redhat.com>
470 * parser.c (cp_parser_direct_declarator): Fix late return
471 for out-of-class defn of member function.
473 2013-03-22 Paolo Carlini <paolo.carlini@oracle.com>
476 * semantics.c (cxx_eval_array_reference): Check for negative index.
478 2013-03-22 Jason Merrill <jason@redhat.com>
481 * parser.c (cp_parser_late_return_type_opt): Save and restore
482 current_class_ptr/ref.
486 * cp-tree.h (tsubst_flags): Add tf_decltype.
487 * call.c (build_cxx_call): Don't build a temporary if it's set.
488 (build_over_call): Make sure it's only passed to build_cxx_call.
489 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
490 (cp_parser_unary_expression): Likewise.
491 (cp_parser_cast_expression): Likewise.
492 (cp_parser_binary_expression): Likewise.
493 (cp_parser_assignment_expression): Likewise.
494 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
495 (cp_parser_explicit_instantiation): Add decltype_p. Force a
496 temporary for a call on the LHS of a comma.
497 (cp_parser_decltype): Pass true to decltype_p parms.
498 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
499 (tsubst_copy_and_build): Pass tf_decltype down only for
500 CALL_EXPR and the RHS of COMPOUND_EXPR.
501 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
504 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
505 (tsubst_arg_types): Likewise.
508 * semantics.c (lambda_capture_field_type): Don't build a
509 magic decltype for pointer types.
510 (lambda_proxy_type): Likewise.
511 (finish_non_static_data_member): Get the quals from
515 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
519 * name-lookup.h (tag_scope): Add ts_lambda.
520 * semantics.c (begin_lambda_type): Use it.
521 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
522 * pt.c (check_default_tmpl_args): Ignore lambdas.
523 (push_template_decl_real): Handle lambdas.
524 * tree.c (no_linkage_check): Adjust lambda check.
527 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
531 * pt.c (instantiate_class_template_1): Instantiate lambda capture
533 (tsubst_copy_and_build): Not here.
535 2013-03-22 Jakub Jelinek <jakub@redhat.com>
537 Backported from mainline
538 2013-03-16 Jakub Jelinek <jakub@redhat.com>
541 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
542 pass op1 through maybe_constant_value first.
544 * tree.c (cp_tree_equal): Fix a pasto.
546 2013-03-22 Release Manager
548 * GCC 4.8.0 released.
550 2013-03-14 Jason Merrill <jason@redhat.com>
553 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
556 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
557 dso_handle parm on targets without __cxa_atexit.
559 2013-03-11 Jason Merrill <jason@redhat.com>
562 * typeck.c (check_return_expr): Disallow returning init list here.
563 * semantics.c (apply_deduced_return_type): Not here.
565 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
568 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
569 * error.c (dump_expr): Likewise.
571 2013-03-08 Jason Merrill <jason@redhat.com>
574 * class.c (modify_all_vtables): Mangle the vtable name before
577 * semantics.c (lambda_expr_this_capture): In unevaluated context,
578 just return the nearest 'this'.
583 * tree.c (maybe_dummy_object): Don't capture 'this'.
584 * semantics.c (maybe_resolve_dummy): New.
585 (finish_non_static_data_member): Use it.
586 (finish_qualified_id_expr): Don't test is_dummy_object.
587 * cp-tree.h: Declare maybe_resolve_dummy.
588 * call.c (build_new_method_call_1): Use it.
591 * semantics.c (apply_deduced_return_type): Don't allow returning
592 std::initializer_list.
594 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
597 * parser.c (cp_parser_elaborated_type_specifier): Don't call
598 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
599 * decl.c (check_elaborated_type_specifier): Tidy.
601 2013-03-06 Jakub Jelinek <jakub@redhat.com>
604 * tree.c (strip_typedefs): Don't copy args if they are NULL.
606 2013-03-05 Jakub Jelinek <jakub@redhat.com>
608 * parser.c (cp_parser_braced_list): For {} initialize
609 *non_constant_p to false.
611 2013-03-04 Jason Merrill <jason@redhat.com>
615 * semantics.c (lambda_expr_this_capture): Handle NSDMI
616 and non-class scopes.
618 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
620 * decl.c (grokdeclarator): Remove dead code.
622 2013-02-28 Jason Merrill <jason@redhat.com>
625 * semantics.c (potential_constant_expression_1): Use
626 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
629 * call.c (build_over_call): Avoid virtual lookup in a template.
631 2013-02-27 Jason Merrill <jason@redhat.com>
635 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
636 of the base name for inheriting ctors.
637 (push_class_level_binding_1): Remove inheriting ctor handling.
638 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
639 * class.c (add_implicitly_declared_members): Adjust.
641 2013-02-26 David Binderman <dcb314@hotmail.com>
644 * decl.c (grokdeclarator): Tidy publicp assignment.
646 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
649 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
650 (build_transaction_expr): Same.
652 2013-02-25 Jason Merrill <jason@redhat.com>
655 * pt.c (fn_type_unification): Wait to call push_tinst_level until
656 we know what args we're looking at.
659 * semantics.c (potential_constant_expression_1): In C++98, a cast
660 to non-integral type can't be a constant expression.
662 2013-02-24 Jakub Jelinek <jakub@redhat.com>
665 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
668 2013-02-22 Jason Merrill <jason@redhat.com>
671 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
672 if we got the wrong number of template parms.
675 * pt.c (fn_type_unification): Use explicit args in template
676 instantiation context.
679 * call.c (can_convert_arg): Discard access checks.
682 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
685 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
688 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
689 * cvt.c (ocp_convert): Use the latter.
690 (cp_convert_to_pointer): Likewise.
691 * decl.c (check_default_argument): Likewise.
692 * typeck.c (cp_build_binary_op): Likewise.
693 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
695 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
696 Paolo Carlini <paolo.carlini@oracle.com>
699 * decl2.c (grokbitfield): Allow scoped enumeration types.
701 2013-02-15 Jason Merrill <jason@redhat.com>
704 * semantics.c (finish_id_expression): Also return the identifier
705 for an outer local static.
708 * class.c (check_bases_and_members): Deduce noexcept after
712 * semantics.c (finish_id_expression): In a template, return
713 the identifier for a constant variable.
715 2013-02-14 Jason Merrill <jason@redhat.com>
718 * semantics.c (build_anon_member_initialization): New.
719 (build_data_member_initialization): Use it.
722 * decl.c (cp_finish_decl): Force instantiation of an
723 auto static data member.
726 * pt.c (unify): A pack expansion that is not the last template
727 argument makes the entire template argument list non-deduced.
730 * name-lookup.c (do_class_using_decl): Handle typedefs with
731 inheriting constructors.
732 (push_class_level_binding_1): Allow inheriting from template
733 template parameter, too.
734 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
737 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
738 default argument scope.
739 * mangle.c (write_name): Likewise.
742 * error.c (find_typenames_r): Don't walk into a pack expansion.
744 2013-02-13 Jason Merrill <jason@redhat.com>
747 * parser.c (cp_parser_member_declaration): Check the declarator
748 form when detecting a function declaration via typedef.
751 * pt.c (maybe_process_partial_specialization): A lambda
752 isn't what's being specialized.
755 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
759 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
762 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
763 non-zero offsets, too.
766 * decl.c (build_enumerator): Always convert the value to a
767 fixed underlying type.
770 * pt.c (tsubst_copy_and_build): Don't forget any new
771 captures that arose from use of dependent names.
773 2013-02-13 Jakub Jelinek <jakub@redhat.com>
776 * semantics.c (finish_asm_stmt): If input constraints allow
777 neither register nor memory, try maybe_constant_value to get
778 a constant if possible.
780 2013-02-12 Jason Merrill <jason@redhat.com>
783 * method.c (add_one_base_init): Handle base constructor
784 taking rvalue reference parm.
787 * semantics.c (sort_constexpr_mem_initializers): Handle
790 2013-02-09 Jason Merrill <jason@redhat.com>
793 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
794 maybe_instantiate_noexcept.
797 * pt.c (eq_specializations): Set comparing_specializations.
798 * tree.c (cp_tree_equal): Check it.
799 * cp-tree.h: Declare it.
801 * decl.c (decls_match): Check versions later.
804 * pt.c (build_non_dependent_expr): Don't try to fold
805 instantiation-dependent expressions.
806 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
807 [BIND_EXPR]: Treat as dependent.
809 2013-02-07 Jakub Jelinek <jakub@redhat.com>
812 * init.c (build_vec_init): Don't append NULL values into new_vec.
813 (build_zero_init_1): Don't push anything into v if recursive call
815 (build_value_init_noctor): Don't push anything into v if
816 build_value_init call returned NULL_TREE.
819 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
820 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
821 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
822 return true only if 2nd token isn't CPP_CLOSE_PAREN.
823 (cp_parser_cast_expression): Adjust caller.
826 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
827 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
828 DECL_LANG_SPECIFIC (t).
830 2013-02-07 Jason Merrill <jason@redhat.com>
833 * method.c (do_build_copy_constructor): Don't bother turning
834 scalars from lvalues to xvalues.
835 (do_build_copy_assign): Likewise.
837 2013-02-06 Jason Merrill <jason@redhat.com>
839 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
841 2013-02-05 Jason Merrill <jason@redhat.com>
844 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
848 * decl.c (start_preparsed_function): Update restype if we change
852 * pt.c (fn_type_unification): Discard any access checks from
853 substituting explicit args.
855 2013-01-31 Jason Merrill <jason@redhat.com>
859 * typeck.c (get_member_function_from_ptrfunc): Fix
860 ptrmemfunc_vbit_in_delta case.
862 2013-01-29 Jason Merrill <jason@redhat.com>
865 * class.c (build_ctor_vtbl_group): Give construction vtables
868 2013-01-25 Jason Merrill <jason@redhat.com>
871 * pt.c (convert_nontype_argument_function): Handle invalid input.
872 (convert_nontype_argument): Likewise.
875 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
876 dynamic type has no virtual functions.
878 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
881 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
882 on TARGET_EXPR nodes.
884 2013-01-22 Jason Merrill <jason@redhat.com>
887 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
889 2013-01-22 Dodji Seketeli <dodji@redhat.com>
892 * pt.c (argument_pack_element_is_expansion_p)
893 (make_argument_pack_select, use_pack_expansion_extra_args_p)
894 (gen_elem_of_pack_expansion_instantiation): New static functions.
895 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
896 look through the possibly resulting pack expansion as well.
897 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
898 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
899 Use gen_elem_of_pack_expansion_instantiation to build the
900 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
901 as gen_elem_of_pack_expansion_instantiation and the change in
902 tsubst above generalize this particular case.
903 (arg_from_parm_pack_p): Remove this for it's not used by
904 tsubst_pack_expansion anymore.
906 2013-01-21 Jason Merrill <jason@redhat.com>
909 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
912 2013-01-18 Jason Merrill <jason@redhat.com>
915 * decl2.c (get_local_tls_init_fn): New.
916 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
917 with aliases for internal variables. Don't use weakrefs if
918 the variable needs destruction.
919 (generate_tls_wrapper): Mark the wrapper as const if no
920 initialization is needed.
921 (handle_tls_init): Don't require aliases.
923 2013-01-15 Dodji Seketeli <dodji@redhat.com>
926 * pt.c (coerce_innermost_template_parms): New static function.
927 (instantiate_alias_template): Use it here.
929 2013-01-09 Jason Merrill <jason@redhat.com>
932 * rtti.c (build_typeid, get_typeid): Add complain parm.
933 (get_tinfo_decl_dynamic): Likewise.
934 * cp-tree.h, parser.c, pt.c: Adjust.
937 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
940 2013-01-09 Jakub Jelinek <jakub@redhat.com>
943 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
944 call maybe_constant_value for the negative or too big shift
947 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
950 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
951 of the argument is true.
953 2013-01-08 Joel Brobecker <brobecker@adacore.com>
955 * parser.c (cp_parser_initializer_list): Move declaration
956 of variable non_const to start of lexical block.
958 2013-01-07 Jason Merrill <jason@redhat.com>
961 * tree.c (build_aggr_init_expr): Do nothing in a template.
962 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
963 a FUNCTION_DECL before tsubsting.
965 2013-01-04 Dodji Seketeli <dodji@redhat.com>
968 * pt.c (check_instantiated_arg): Allow type template arguments.
970 2013-01-04 Jason Merrill <jason@redhat.com>
973 * decl.c (reset_type_linkage, bt_reset_linkage): New.
974 (grokdeclarator): Use reset_type_linkage.
975 * name-lookup.c (binding_table_foreach): Handle null table.
976 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
978 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
981 * parser.c (cp_parser_template_id): Revert core of previous change
982 (keep adjusted inform message).
984 2013-01-03 Jason Merrill <jason@redhat.com>
988 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
992 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
995 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
998 * call.c (type_has_extended_temps): New.
999 * cp-tree.h: Declare it.
1000 * decl.c (check_initializer): Use build_aggr_init for arrays
1002 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
1004 2013-01-02 Jason Merrill <jason@redhat.com>
1007 * call.c (build_new_method_call_1): Don't use build_value_init for
1008 user-provided default constructors.
1010 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
1014 * tree.c (build_cplus_array_type): Copy layout information
1015 to main variant if necessary.
1017 Copyright (C) 2013 Free Software Foundation, Inc.
1019 Copying and distribution of this file, with or without modification,
1020 are permitted in any medium without royalty provided the copyright
1021 notice and this notice are preserved.