call.c (build_new_method_call_1): Use INDIRECT_REF_P.
[official-gcc.git] / gcc / cp / ChangeLog
blob5a1cac41124434024dbb2ffc33309f2f4b3af7e1
1 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
4         * cvt.c (convert_to_void): Likewise.
5         * error.c (dump_expr): Likewise.
6         * mangle.c (write_expression): Likewise.
7         * parser.c (cp_parser_template_argument): Likewise.
8         * pt.c (convert_nontype_argument): Likewise.
9         (tsubst_copy_and_build): Likewise.
10         * rtti.c (build_typeid): Likewise.
11         * semantics.c (finish_call_expr): Likewise.
12         (finish_decltype_type): Likewise.
13         (build_data_member_initialization): Likewise.
14         * tree.c (is_dummy_object): Likewise.
15         * typeck.c (decay_conversion): Likewise.
16         (build_class_member_access_expr): Likewise.
17         (cp_build_addr_expr_1): Likewise.
18         (unary_complex_lvalue): Likewise.
19         (check_return_expr): Likewise.
20         * typeck2.c (cxx_readonly_error): Likewise.
22 2013-03-26  Jason Merrill  <jason@redhat.com>
24         PR c++/52597
25         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
26         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
27         * cp-tree.h: Adjust prototype.
29         PR c++/45282
30         * typeck2.c (build_m_component_ref): Handle prvalue object.
32 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
34         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
35         * decl.c (duplicate_decls): Likewise.
36         (cp_finish_decl): Likewise.
37         (check_class_member_definition_namespace): Likewise.
38         * decl2.c (grokfield): Likewise.
39         (decl_needed_p): Likewise.
40         (import_export_decl): Likewise.
41         (mark_used): Likewise.
42         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
43         * pt.c (push_access_scope): Likewise.
44         (instantiate_decl): Likewise.
45         * ptree.c (cxx_print_decl): Likewise.
46         * repo.c (repo_emit_p): Likewise.
47         * semantics.c (note_decl_for_pch): Likewise.
48         * tree.c (decl_linkage): Likewise.
50 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
52         PR c++/55951
53         * decl.c (check_array_designated_initializer): Handle CONST_DECL
54         as ce->index.
56 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
58         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
59         error messages.
61         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
63 2013-03-25  Jason Merrill  <jason@redhat.com>
65         PR c++/56699
66         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
67         class is derived from the type of the object.
69         PR c++/52014
70         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
71         unevaluated context.
73 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
75         PR c++/56722
76         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
77         DECL_TEMPLATE_INSTANTIATION.
79 2013-03-22  Jason Merrill  <jason@redhat.com>
81         PR c++/56684
82         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
83         and CONST_DECL.
85 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
87         * cp-tree.h (identifier_p): New.
88         * call.c: Throughout, call identifier_p insstead of direct
89         comparaison of TREE_CODE against IDENTIFIER_NODE.
90         * decl.c: Likewisse.
91         * decl2.c: Likewise.
92         * init.c: Likewise.
93         * mangle.c: Likewise.
94         * name-lookup.c: Likewise.
95         * parser.c: Likewise.
96         * pt.c: Likewise.
97         * search.c: Likewise.
98         * semantics.c: Likewise.
99         * tree.c: Likewise.
100         * typeck.c: Likewise.
101         * typeck2.c: Likewise.
103 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
105         PR middle-end/48087
106         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
107         * call.c (build_temp): Likewise.
108         * method.c (synthesize_method): Likewise.
109         * typeck.c (convert_for_initialization): Likewise.
111 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
113         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
115 2013-03-21  Richard Biener  <rguenther@suse.de>
117         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
118         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
120 2013-03-20  Jason Merrill  <jason@redhat.com>
122         PR c++/56646
123         * parser.c (cp_parser_late_return_type_opt): Save and restore
124         current_class_ptr/ref.
126         PR c++/54532
127         * expr.c (cplus_expand_constant): Do nothing if the class is
128         incomplete.
129         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
130         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
131         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
132         (complete_vars): Likewise.
134         * name-lookup.c (get_anonymous_namespace_name): Never use
135         get_file_function_name.
137         * pt.c (retrieve_specialization): Handle null tmpl argument.
139         PR c++/17232
140         PR c++/56642
141         * pt.c (tsubst_decl): Check return value of register_specialization.
142         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
143         change.
145 2013-03-17  Jason Merrill  <jason@redhat.com>
147         PR c++/54359
148         PR c++/56639
149         * parser.c (cp_parser_direct_declarator): Bail if we see a
150         qualified-id not at namespace scope.
152         PR c++/17232
153         PR c++/56642
154         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
155         change for now.
157 2013-03-16  Jason Merrill  <jason@redhat.com>
159         * decl.c (grokdeclarator): Assert that we won't see a pointer to
160         METHOD_TYPE.
162         PR c++/54277
163         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
164         (MAYBE_CLASS_TYPE_P): ...here.
165         * semantics.c (lambda_capture_field_type): Only build a
166         magic decltype for wildcard types.
167         (lambda_proxy_type): Likewise.
168         (finish_non_static_data_member): Get the quals from
169         the object.
171         PR c++/55931
172         * parser.c (cp_parser_template_argument): Don't
173         fold_non_dependent_expr.
175         * parser.c (cp_parser_lambda_declarator_opt): Use
176         cp_parser_trailing_type_id.
178         PR c++/45917
179         * parser.c (cp_parser_template_id): Don't forget access checks.
181         PR c++/52374
182         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
184         PR c++/54764
185         PR c++/55972
186         * name-lookup.h (tag_scope): Add ts_lambda.
187         * semantics.c (begin_lambda_type): Use it.
188         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
189         * pt.c (check_default_tmpl_args): Ignore lambdas.
190         (push_template_decl_real): Handle lambdas.
191         * tree.c (no_linkage_check): Adjust lambda check.
193         PR c++/56039
194         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
196         PR c++/54359
197         * parser.c (cp_parser_direct_declarator): Fix late return
198         for out-of-class defn of member function.
200         PR c++/55357
201         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
202         parms to avoid duplicate -Wshadow warnings.
204         * search.c (lookup_base): Handle NULL_TREE.
206         PR c++/56481
207         * semantics.c (potential_constant_expression_1): Use of 'this' in
208         a non-constexpr function makes the expression not potentially
209         constant.
211         N3276
212         PR c++/52748
213         * cp-tree.h (tsubst_flags): Add tf_decltype.
214         * call.c (build_cxx_call): Don't build a temporary if it's set.
215         (build_over_call): Make sure it's only passed to build_cxx_call.
216         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
217         (cp_parser_unary_expression): Likewise.
218         (cp_parser_cast_expression): Likewise.
219         (cp_parser_binary_expression): Likewise.
220         (cp_parser_assignment_expression): Likewise.
221         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
222         (cp_parser_expression): Add decltype_p.  Force a
223         temporary for a call on the LHS of a comma.
224         (cp_parser_decltype): Pass true to decltype_p parms.
225         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
226         (tsubst_copy_and_build): Pass tf_decltype down only for
227         CALL_EXPR and the RHS of COMPOUND_EXPR.
228         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
230         * cp-tree.h (abstract_class_use): New enum.
231         * typeck2.c (pending_abstract_type): Add use field.
232         (abstract_virtuals_error_sfinae): Add overloads taking
233         abstract_class_use instead of tree.
234         * typeck.c (build_static_cast_1): Call it.
235         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
236         * pt.c: Adjust calls.
237         * decl.c (cp_finish_decl): Don't handle functions specially.
238         (grokdeclarator): Always check return type.
239         * init.c (build_new_1): Adjust call.
241         DR 337
242         PR c++/17232
243         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
244         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
246         DR 657
247         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
248         (tsubst_arg_types): Likewise.
250         DR 1518
251         PR c++/54835
252         * call.c (convert_like_real): Check for explicit constructors
253         even for value-initialization.
255         PR c++/54946
256         * pt.c (convert_nontype_argument): Handle invalid pointer.
258         * parser.c (cp_parser_lambda_expression): Use nreverse.
260         PR c++/56447
261         PR c++/55532
262         * pt.c (instantiate_class_template_1): Instantiate lambda capture
263         list here.
264         (tsubst_copy_and_build): Not here.
266         PR c++/55017
267         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
269         PR c++/55240
270         * parser.c (parsing_nsdmi): New.
271         * semantics.c (outer_automatic_var_p): Check it.
272         (finish_id_expression): Likewise.
273         * cp-tree.h: Declare it.
275         PR c++/55241
276         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
278         * parser.c (lookup_literal_operator): Correct parm/arg naming
279         mixup.
281         PR c++/56238
282         * pt.c (fold_non_dependent_expr_sfinae): Check
283         instantiation_dependent_expression_p.
285         PR c++/56095
286         * class.c (resolve_address_of_overloaded_function): Accept a
287         reference to function for target_type.
288         (instantiate_type): Likewise.
289         * pt.c (convert_nontype_argument): Pass it to
290         convert_nontype_argument_function.
292 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
294         * tree.c (cp_tree_equal): Fix a pasto.
296         PR c++/56607
297         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
298         pass op1 through maybe_constant_value first.
300 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
302         PR c++/56582
303         * semantics.c (cxx_eval_array_reference): Check for negative index.
305 2013-03-14  Jason Merrill  <jason@redhat.com>
307         PR c++/56614
308         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
310         PR c++/56346
311         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
312         dso_handle parm on targets without __cxa_atexit.
314 2013-03-11  Jason Merrill  <jason@redhat.com>
316         PR c++/56567
317         * typeck.c (check_return_expr): Disallow returning init list here.
318         * semantics.c (apply_deduced_return_type): Not here.
320 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
322         PR c++/51412
323         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
324         * error.c (dump_expr): Likewise.
326 2013-03-08  Jason Merrill  <jason@redhat.com>
328         PR c++/51884
329         * class.c (modify_all_vtables): Mangle the vtable name before
330         entering dfs_walk.
332         * semantics.c (lambda_expr_this_capture): In unevaluated context,
333         just return the nearest 'this'.
335         PR c++/51494
336         PR c++/52183
337         PR c++/56222
338         * tree.c (maybe_dummy_object): Don't capture 'this'.
339         * semantics.c (maybe_resolve_dummy): New.
340         (finish_non_static_data_member): Use it.
341         (finish_qualified_id_expr): Don't test is_dummy_object.
342         * cp-tree.h: Declare maybe_resolve_dummy.
343         * call.c (build_new_method_call_1): Use it.
345         PR c++/56567
346         * semantics.c (apply_deduced_return_type): Don't allow returning
347         std::initializer_list.
349 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
351         PR c++/56534
352         * parser.c (cp_parser_elaborated_type_specifier): Don't call
353         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
354         * decl.c (check_elaborated_type_specifier): Tidy.
356 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
358         PR c++/56543
359         * tree.c (strip_typedefs): Don't copy args if they are NULL.
361 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
363         * parser.c (cp_parser_braced_list): For {} initialize
364         *non_constant_p to false.
366 2013-03-04  Jason Merrill  <jason@redhat.com>
368         PR c++/56464
369         PR c++/54383
370         * semantics.c (lambda_expr_this_capture): Handle NSDMI
371         and non-class scopes.
373 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
375         * decl.c (grokdeclarator): Remove dead code.
377 2013-02-28  Jason Merrill  <jason@redhat.com>
379         PR c++/56481
380         * semantics.c (potential_constant_expression_1): Use
381         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
383         PR c++/56243
384         * call.c (build_over_call): Avoid virtual lookup in a template.
386 2013-02-27  Jason Merrill  <jason@redhat.com>
388         PR c++/56358
389         PR c++/56323
390         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
391         of the base name for inheriting ctors.
392         (push_class_level_binding_1): Remove inheriting ctor handling.
393         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
394         * class.c (add_implicitly_declared_members): Adjust.
396 2013-02-26  David Binderman  <dcb314@hotmail.com>
398         PR c++/55632
399         * decl.c (grokdeclarator): Tidy publicp assignment.
401 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
403         PR c++/56419
404         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
405         (build_transaction_expr): Same.
407 2013-02-25  Jason Merrill  <jason@redhat.com>
409         PR c++/56377
410         * pt.c (fn_type_unification): Wait to call push_tinst_level until
411         we know what args we're looking at.
413         PR c++/56438
414         * semantics.c (potential_constant_expression_1): In C++98, a cast
415         to non-integral type can't be a constant expression.
417 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
419         PR c++/56403
420         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
421         of CLASS_TYPE_P.
423 2013-02-22  Jason Merrill  <jason@redhat.com>
425         PR c++/40405
426         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
427         if we got the wrong number of template parms.
429         PR c++/56377
430         * pt.c (fn_type_unification): Use explicit args in template
431         instantiation context.
433         PR c++/56359
434         * call.c (can_convert_arg): Discard access checks.
436         PR c++/56395
437         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
438         args.
440 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
442         PR c++/56373
443         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
444         * cvt.c (ocp_convert): Use the latter.
445         (cp_convert_to_pointer): Likewise.
446         * decl.c (check_default_argument): Likewise.
447         * typeck.c (cp_build_binary_op): Likewise.
448         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
450 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
451             Paolo Carlini  <paolo.carlini@oracle.com>
453         PR c++/51242
454         * decl2.c (grokbitfield): Allow scoped enumeration types.
456 2013-02-15  Jason Merrill  <jason@redhat.com>
458         PR c++/54276
459         * semantics.c (finish_id_expression): Also return the identifier
460         for an outer local static.
462         PR c++/56343
463         * class.c (check_bases_and_members): Deduce noexcept after
464         checking bases.
466         PR c++/52026
467         * semantics.c (finish_id_expression): In a template, return
468         the identifier for a constant variable.
470 2013-02-14  Jason Merrill  <jason@redhat.com>
472         PR c++/54922
473         * semantics.c (build_anon_member_initialization): New.
474         (build_data_member_initialization): Use it.
476         PR c++/55003
477         * decl.c (cp_finish_decl): Force instantiation of an
478         auto static data member.
480         PR c++/55220
481         * pt.c (unify): A pack expansion that is not the last template
482         argument makes the entire template argument list non-deduced.
484         PR c++/56323
485         * name-lookup.c (do_class_using_decl): Handle typedefs with
486         inheriting constructors.
487         (push_class_level_binding_1): Allow inheriting from template
488         template parameter, too.
489         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
491         PR c++/55223
492         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
493         default argument scope.
494         * mangle.c (write_name): Likewise.
496         PR c++/55232
497         * error.c (find_typenames_r): Don't walk into a pack expansion.
499 2013-02-13  Jason Merrill  <jason@redhat.com>
501         PR c++/55670
502         * parser.c (cp_parser_member_declaration): Check the declarator
503         form when detecting a function declaration via typedef.
505         PR c++/55680
506         * pt.c (maybe_process_partial_specialization): A lambda
507         isn't what's being specialized.
509         PR c++/55710
510         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
511         TREE_USED.
513         PR c++/55879
514         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
516         PR c++/55993
517         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
518         non-zero offsets, too.
520         PR c++/56155
521         * decl.c (build_enumerator): Always convert the value to a
522         fixed underlying type.
524         PR c++/56135
525         * pt.c (tsubst_copy_and_build): Don't forget any new
526         captures that arose from use of dependent names.
528 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
530         PR c++/56302
531         * semantics.c (finish_asm_stmt): If input constraints allow
532         neither register nor memory, try maybe_constant_value to get
533         a constant if possible.
535 2013-02-12  Jason Merrill  <jason@redhat.com>
537         PR c++/56285
538         * method.c (add_one_base_init): Handle base constructor
539         taking rvalue reference parm.
541         PR c++/56291
542         * semantics.c (sort_constexpr_mem_initializers): Handle
543         vptr out of order.
545 2013-02-09  Jason Merrill  <jason@redhat.com>
547         PR c++/56268
548         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
549         maybe_instantiate_noexcept.
551         PR c++/56247
552         * pt.c (eq_specializations): Set comparing_specializations.
553         * tree.c (cp_tree_equal): Check it.
554         * cp-tree.h: Declare it.
556         * decl.c (decls_match): Check versions later.
558         PR c++/56238
559         * pt.c (build_non_dependent_expr): Don't try to fold
560         instantiation-dependent expressions.
561         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
562         [BIND_EXPR]: Treat as dependent.
564 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
566         PR c++/56241
567         * init.c (build_vec_init): Don't append NULL values into new_vec.
568         (build_zero_init_1): Don't push anything into v if recursive call
569         returned NULL_TREE.
570         (build_value_init_noctor): Don't push anything into v if
571         build_value_init call returned NULL_TREE.
573         PR c++/56239
574         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
575         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
576         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
577         return true only if 2nd token isn't CPP_CLOSE_PAREN.
578         (cp_parser_cast_expression): Adjust caller.
580         PR c++/56237
581         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
582         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
583         DECL_LANG_SPECIFIC (t).
585 2013-02-07  Jason Merrill  <jason@redhat.com>
587         PR c++/56235
588         * method.c (do_build_copy_constructor): Don't bother turning
589         scalars from lvalues to xvalues.
590         (do_build_copy_assign): Likewise.
592 2013-02-06  Jason Merrill  <jason@redhat.com>
594         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
596 2013-02-05  Jason Merrill  <jason@redhat.com>
598         PR c++/54122
599         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
600         METHOD_TYPE.
602         PR c++/56177
603         * decl.c (start_preparsed_function): Update restype if we change
604         decl1.
606         PR c++/56208
607         * pt.c (fn_type_unification): Discard any access checks from
608         substituting explicit args.
610 2013-01-31  Jason Merrill  <jason@redhat.com>
612         PR c++/56162
613         PR c++/56104
614         * typeck.c (get_member_function_from_ptrfunc): Fix
615         ptrmemfunc_vbit_in_delta case.
617 2013-01-29  Jason Merrill  <jason@redhat.com>
619         PR libstdc++/54314
620         * class.c (build_ctor_vtbl_group): Give construction vtables
621         hidden visibility.
623 2013-01-25  Jason Merrill  <jason@redhat.com>
625         PR c++/56095
626         * pt.c (convert_nontype_argument_function): Handle invalid input.
627         (convert_nontype_argument): Likewise.
629         PR c++/56104
630         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
631         dynamic type has no virtual functions.
633 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
635         PR c++/55944
636         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
637         on TARGET_EXPR nodes.
639 2013-01-22  Jason Merrill  <jason@redhat.com>
641         PR c++/56071
642         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
644 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
646         PR c++/53609
647         * pt.c (argument_pack_element_is_expansion_p)
648         (make_argument_pack_select, use_pack_expansion_extra_args_p)
649         (gen_elem_of_pack_expansion_instantiation): New static functions.
650         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
651         look through the possibly resulting pack expansion as well.
652         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
653         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
654         Use gen_elem_of_pack_expansion_instantiation to build the
655         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
656         as gen_elem_of_pack_expansion_instantiation and the change in
657         tsubst above generalize this particular case.
658         (arg_from_parm_pack_p): Remove this for it's not used by
659         tsubst_pack_expansion anymore.
661 2013-01-21  Jason Merrill  <jason@redhat.com>
663         PR c++/56059
664         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
665         template args count.
667 2013-01-18  Jason Merrill  <jason@redhat.com>
669         PR target/54908
670         * decl2.c (get_local_tls_init_fn): New.
671         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
672         with aliases for internal variables.  Don't use weakrefs if
673         the variable needs destruction.
674         (generate_tls_wrapper): Mark the wrapper as const if no
675         initialization is needed.
676         (handle_tls_init): Don't require aliases.
678 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
680         PR c++/55663
681         * pt.c (coerce_innermost_template_parms): New static function.
682         (instantiate_alias_template):  Use it here.
684 2013-01-09  Jason Merrill  <jason@redhat.com>
686         PR c++/55878
687         * rtti.c (build_typeid, get_typeid): Add complain parm.
688         (get_tinfo_decl_dynamic): Likewise.
689         * cp-tree.h, parser.c, pt.c: Adjust.
691         PR c++/55893
692         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
693         needs destruction.
695 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
697         PR c/48418
698         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
699         call maybe_constant_value for the negative or too big shift
700         count warnings.
702 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
704         PR c++/55801
705         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
706         of the argument is true.
708 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
710         * parser.c (cp_parser_initializer_list): Move declaration
711         of variable non_const to start of lexical block.
713 2013-01-07  Jason Merrill  <jason@redhat.com>
715         PR c++/55753
716         * tree.c (build_aggr_init_expr): Do nothing in a template.
717         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
718         a FUNCTION_DECL before tsubsting.
720 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
722         PR c++/52343
723         * pt.c (check_instantiated_arg): Allow type template arguments.
725 2013-01-04  Jason Merrill  <jason@redhat.com>
727         PR c++/55877
728         * decl.c (reset_type_linkage, bt_reset_linkage): New.
729         (grokdeclarator): Use reset_type_linkage.
730         * name-lookup.c (binding_table_foreach): Handle null table.
731         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
733 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
735         PR c++/54526 (again)
736         * parser.c (cp_parser_template_id): Revert core of previous change
737         (keep adjusted inform message).
739 2013-01-03  Jason Merrill  <jason@redhat.com>
741         PR c++/55419
742         PR c++/55753
743         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
744         TREE_CONSTANT.
746         PR c++/55842
747         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
749         PR c++/55856
750         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
752         PR c++/53650
753         * call.c (type_has_extended_temps): New.
754         * cp-tree.h: Declare it.
755         * decl.c (check_initializer): Use build_aggr_init for arrays
756         if it is false.
757         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
759 2013-01-02  Jason Merrill  <jason@redhat.com>
761         PR c++/54325
762         * call.c (build_new_method_call_1): Don't use build_value_init for
763         user-provided default constructors.
765         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
767         PR c++/55032
768         PR c++/55245
769         * tree.c (build_cplus_array_type): Copy layout information
770         to main variant if necessary.
772 Copyright (C) 2013 Free Software Foundation, Inc.
774 Copying and distribution of this file, with or without modification,
775 are permitted in any medium without royalty provided the copyright
776 notice and this notice are preserved.