2013-06-18 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / cp / ChangeLog
blob1b58ba00f4b59cae7f118121eb1d34e734f2db26
1 2013-06-17  Richard Biener  <rguenther@suse.de>
3         * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
5 2013-06-17  Paolo Carlini  <paolo.carlini@oracle.com>
7         PR c++/16128
8         * parser.c (cp_parser_expression_statement): Check whether
9         cp_parser_expression returns error_mark_node.
11 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
13         PR c++/51413
14         * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
16 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
18         PR c++/57599
19         * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
20         accessible base simply forward to build_static_cast.
22 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
24         PR c++/38958
25         * decl.c (poplevel): For the benefit of -Wunused-variable see
26         through references.
28 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
30         * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
32 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
34         PR c++/42021
35         * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
36         again diagnostic already emitted by cp_parser_lookup_name.
38 2013-06-11  Jan Hubicka  <jh@suse.cz>
40         PR c++/57551
41         * cp/pt.c (mark_decl_instantiated): Do not export explicit
42         instantiations of anonymous namespace templates.
44 2013-06-10  Jason Merrill  <jason@redhat.com>
46         * name-lookup.c (add_decl_to_level): Add decls in an anonymous
47         namespace to static_decls.
49 2013-06-07  Sriraman Tallam  <tmsriram@google.com>
51         PR c++/57548
52         * call.c (build_over_call):  Check if current_function_decl is
53         NULL.
55 2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
57         PR c++/53658
58         * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
59         not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
61 2013-06-06  Jason Merrill  <jason@redhat.com>
63         PR c++/55520
64         * semantics.c (add_capture): Diagnose capture of variable-size
65         type that is not a C++1y array of runtime bound.
67         * decl.c (grokdeclarator): Keep a decl with error type.
68         (grokfield, grokbitfield): Likewise.
69         * pt.c (instantiate_class_template_1): Likewise.
70         (tsubst_decl): Drop redundant error.
71         * class.c (walk_subobject_offsets): Handle erroneous fields.
72         * typeck2.c (process_init_constructor_record): Likewise.
74 2013-06-05  Paolo Carlini  <paolo.carlini@oracle.com>
76         PR c++/51908
77         * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
78         parser->in_type_id_in_expr_p before calling cp_parser_type_id.
80 2013-06-03  Jan Hubicka  <jh@suse.cz>
82         * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
83         mark_decl_referenced.
84         (mark_needed): Likewise.
86 2013-06-03  Jason Merrill  <jason@redhat.com>
88         * class.c (mark_type_abi_tags): New.
89         (check_abi_tags): Use it.
91 2013-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
93         PR c++/57419
94         * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
95         * semantics.c (finish_qualified_id_expr): Use it.
96         * cp-tree.h: Update.
98 2013-06-01  Jan Hubicka  <jh@suse.cz>
100         * decl2.c (cp_write_global_declarations): Replace same_body_alias
101         by symbol.cpp_implicit_alias.
103 2013-05-30  Jason Merrill  <jason@redhat.com>
105         PR c++/57404
106         * cp-lang.c (cp_classify_record): Handle structs without
107         TYPE_LANG_SPECIFIC.
109         PR c++/52377
110         * class.c (common_enclosing_class): New.
111         * cp-tree.h: Declare it.
112         * init.c (sort_mem_initializers): Don't splice out a union member
113         with an NSDMI.
115 2013-05-29  Jan Hubicka  <jh@suse.cz>
117         * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
118         * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
120 2013-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
122         PR c++/25666
123         * decl2.c (check_classfn): Check for destructors declared as member
124         templates.
126 2013-05-24  Jason Merrill  <jason@redhat.com>
128         PR c++/56971
129         * pt.c (any_template_arguments_need_structural_equality_p): A
130         TEMPLATE_TEMPLATE_PARM can require structural type comparison.
132 2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
134         PR c++/19618
135         * class.c (check_bitfield_decl): Warn for bool and enum bitfields
136         with width exceeding the type.
138 2013-05-24  Jason Merrill  <jason@redhat.com>
140         PR c++/57391
141         * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
142         (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
144 2013-05-23  Jason Merrill  <jason@redhat.com>
146         PR c++/57388
147         * tree.c (build_ref_qualified_type): Clear
148         FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
150 2013-05-22  Jason Merrill  <jason@redhat.com>
152         PR c++/56930
153         * call.c (convert_like_real): Use cp_convert_and_check.
154         * cvt.c (cp_convert_and_check): Use maybe_constant_value.
155         * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
156         (potential_constant_expression_1): Handle OMP_ATOMIC*.
158         PR c++/56915
159         * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
160         isn't defined.
162 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
164         PR c++/57352
165         * parser.c (cp_parser_conversion_type_id): Set up
166         parser->type_definition_forbidden_message before calling
167         cp_parser_type_specifier_seq.
169 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
171         PR c++/57211
172         * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
173         warnings about defaulted functions.
175 2013-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
177         * call.c (build_conditional_expr_1): Add location_t parameter.
178         (build_conditional_expr): Likewise.
179         * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
180         get_member_function_from_ptrfunc, build_x_conditional_expr,
181         cp_build_modify_expr): Update.
182         * init.c (build_new_1): Likewise.
183         * cp-tree.h: Update declaration.
185 2013-05-20  Jason Merrill  <jason@redhat.com>
187         PR c++/57016
188         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
189         if there is one.
191         PR c++/57102
192         * decl.c (fndecl_declared_return_type): Also look in
193         DECL_SAVED_FUNCTION_DATA.
195 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
197         PR c++/12288
198         * parser.c (cp_parser_parameter_declaration): Check return value
199         of cp_parser_parse_and_diagnose_invalid_type_name.
201 2013-05-20  Jason Merrill  <jason@redhat.com>
203         PR c++/57319
204         * class.c (vbase_has_user_provided_move_assign): New.
205         * method.c (synthesized_method_walk): Check it.
206         * cp-tree.h: Declare it.
208         PR c++/57325
209         * tree.c (build_cplus_array_type): Copy layout info if element
210         type is complete.
212 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
214         PR c++/23608
215         * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
217 2013-05-20  Jason Merrill  <jason@redhat.com>
219         PR c++/57317
220         * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
221         whether a template has its own args.
223 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
225         PR c++/57327
226         * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
228 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
230         PR c++/10207
231         * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
232         instead of cp_parser_initializer_list for compound-literals.
234 2013-05-20  Marc Glisse  <marc.glisse@inria.fr>
236         PR c++/57175
237         * typeck.c (check_return_expr): Reverse the alignment comparison.
239 2013-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
241         PR c++/18126
242         * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
243         correctly sizeof compound-literal; update comments.
245 2013-05-16  Marc Glisse  <marc.glisse@inria.fr>
247         * call.c (build_conditional_expr_1): Use cp_build_binary_op
248         instead of directly calling fold_build2.
250 2013-05-16  Jason Merrill  <jason@redhat.com>
252         * Make-lang.in (cc1plus$(exeext)): Use link mutex.
254         PR c++/57279
255         * decl.c (grokdeclarator): Allow member function qualifiers in
256         TYPENAME context in C++11 mode.
258 2013-05-16  Dodji Seketeli  <dodji@redhat.com>
260         PR c++/56782 - Regression with empty pack expansions
261         * pt.c (use_pack_expansion_extra_args_p): When at least a
262         parameter pack has an empty argument pack, and another parameter
263         pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
264         mechanism.
266 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
268         * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
269         warning_at and permerror with warning_at/inform and permerror/
270         inform, respectively.
272 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
274         PR c++/31952
275         * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
276         redeclarations.
278 2013-05-14  Jason Merrill  <jason@redhat.com>
280         PR c++/57243
281         * parser.c (cp_parser_range_for): Call complete_type.
283         PR c++/57041
284         * pt.c (tsubst_copy_and_build): Don't recur into a designator.
286 2013-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
288         PR c++/53903
289         * method.c (defaulted_late_check): Check for compatible exception
290         specification out of class explicitly defaulted functions too.
292 2013-05-14  Jason Merrill  <jason@redhat.com>
294         PR c++/56998
295         * semantics.c (potential_constant_expression_1): Make sure the
296         called function is potentially constant.
297         * call.c (null_ptr_cst_p): Revert earlier change.
299 2013-05-13  Jason Merrill  <jason@redhat.com>
301         PR c++/56998
302         * call.c (null_ptr_cst_p): An expression with side-effects can't
303         be a C++03 null pointer constant.
305         PR c++/57041
306         * decl.c (reshape_init_class): Handle error_mark_node.
308         PR c++/57254
309         * typeck.c (merge_types): Propagate ref-qualifier
310         in METHOD_TYPE case.
312         PR c++/57253
313         * decl.c (grokdeclarator): Apply ref-qualifier
314         in the TYPENAME case.
316         PR c++/57252
317         * decl.c (decls_match): Compare ref-qualifiers.
319 2013-05-10  Jason Merrill  <jason@redhat.com>
321         PR c++/57196
322         * pt.c (convert_template_argument): Use dependent_template_arg_p,
323         not uses_template_parms.
325         PR c++/57047
326         * semantics.c (cxx_fold_indirect_ref): Fix thinko.
328         PR c++/55149
329         * semantics.c (add_capture): Error rather than abort on copy
330         capture of VLA.
331         * typeck.c (maybe_warn_about_returning_address_of_local): Don't
332         warn about capture proxy.
334 2013-05-09  Jason Merrill  <jason@redhat.com>
336         * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
338         PR c++/57222
339         * pt.c (lookup_template_class_1): Handle getting a template
340         template parameter as D1.
342         N3639 C++1y VLA diagnostics
343         * decl.c (grokdeclarator): Complain about reference, pointer, or
344         typedef to VLA.
345         (create_array_type_for_decl): Complain about array of VLA.
346         * pt.c (tsubst): Likewise.
347         * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
348         * semantics.c (finish_decltype_type): Complain about decltype of VLA.
349         * typeck.c (cp_build_addr_expr_1): Complain about VLA.
350         (cxx_sizeof_or_alignof_type): Likewise.
352         N3639 C++1y VLA support
353         * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
354         (check_array_initializer): Allow VLA init.
355         (reshape_init_array_1): Adjust.
356         (cp_finish_decl): Check for invalid VLA length.
357         * typeck2.c (process_init_constructor_array): Adjust.
358         (store_init_value): Use build_vec_init for VLAs.
359         * semantics.c (add_capture): Capture VLA as ptr+len.
360         (vla_capture_type): New.
361         (build_capture_proxy): Rebuild the VLA.
362         * typeck.c (build_simple_component_ref): Split out from...
363         (build_ptrmemfunc_access_expr): ...here.
364         * tree.c (array_of_runtime_bound_p): New.
365         * init.c (throw_bad_array_length): New.
366         (build_vec_init): Use it.
367         * parser.c (cp_convert_range_for): When iterating over a VLA,
368         use it directly rather than bind a reference.
369         * cp-tree.h: Declare new functions.
371 2013-05-08  Jason Merrill  <jason@redhat.com>
373         * except.c (is_admissible_throw_operand_or_catch_parameter): Check
374         variably_modified_type_p.
375         (expand_start_catch_block): Mark the typeinfo used here.
376         * semantics.c (finish_handler_parms): Not here.
378         * error.c (dump_type_suffix): Try harder on VLA length.
380         Core 624/N2932
381         * init.c (throw_bad_array_new_length): New.
382         (build_new_1): Use it.  Don't warn about braced-init-list.
383         (build_vec_init): Use it.
384         * call.c (build_operator_new_call): Use it.
386         PR c++/57068
387         * decl.c (grokdeclarator): Warn about ref-qualifiers here.
388         * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
389         * error.c (maybe_warn_cpp0x): s/0x/11/.
391 2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
393         PR c++/51226
394         * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
395         == error_mark_node.
397 2013-05-06  Marc Glisse  <marc.glisse@inria.fr>
399         * typeck.c (cp_build_binary_op): Call save_expr before
400         build_vector_from_val.
402 2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
404         PR c++/57183
405         * decl.c (cp_finish_decl): After do_auto_deduction copy the
406         qualifers with cp_apply_type_quals_to_decl.
408 2013-05-05  Paolo Carlini  <paolo.carlini@oracle.com>
410         * pt.c (convert_nontype_argument): Add missing whitespace in
411         error message.
413 2013-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
415         PR c++/53745
416         * decl.c (build_enumerator): Improve error message.
418 2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
420         PR c++/14283
421         * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
422         messages for template types and fix column numbers.
424 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
426         PR c++/57132
427         * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
428         c_inhibit_evaluation_warnings around build_x_modify_expr call.
430 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
432         PR c++/57092
433         * semantics.c (finish_decltype_type): Handle instantiated template
434         non-type arguments.
436 2013-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
438         PR c++/56450
439         * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
441 2013-04-26  Jakub Jelinek  <jakub@redhat.com>
443         * error.c (cp_print_error_function): Adjust file_name_as_prefix
444         caller.
446 2013-04-25  Jason Merrill  <jason@redhat.com>
448         PR c++/56859
449         * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
451         PR c++/50261
452         * init.c (perform_member_init): Call reshape_init.
454 2013-04-24  Jason Merrill  <jason@redhat.com>
456         PR c++/53721
457         * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
459 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
461         * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
462         pedwarn to simply use OPT_Wpointer_arith.
463         (cp_build_unary_op): Likewise.
465 2013-04-24  Jason Merrill  <jason@redhat.com>
467         N3648: init-captures are named.
468         * semantics.c (add_capture): Don't prepend "__" to init-captures.
469         (build_capture_proxy): Adjust.
470         * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
472         N3648: Allow braced and parenthesized initializers.
473         * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
474         * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
475         * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
476         (add_capture): Collapse a parenthesized initializer into a single
477         expression.
478         * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
480 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
482         PR c++/56970
483         * init.c (build_offset_ref): Add tsubst_flags_t parameter.
484         * semantics.c (finish_qualified_id_expr): Likewise.
485         (finish_id_expression): Update.
486         * typeck.c (cp_build_addr_expr_1): Likewise.
487         * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
488         * cp-tree.h: Update declarations.
490 2013-04-22  Jason Merrill  <jason@redhat.com>
492         Core 1586
493         * parser.c (cp_parser_unqualified_id): Handle ~auto.
494         (cp_parser_pseudo_destructor_name): Likewise.
495         (cp_parser_postfix_dot_deref_expression): Adjust.
496         (cp_lexer_nth_token_is_keyword): New.
497         * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
498         * typeck.c (lookup_destructor): Handle ~auto.
500         * pt.c (fn_type_unification): Push tinst level around
501         type_unification_real if we aren't explaining.
502         * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
503         * error.c (dump_function_decl): Respect it.
504         (subst_to_string): Pass it.
506         PR c++/48665
507         * rtti.c (get_typeid): Diagnose qualified function type.
508         * pt.c (tsubst) [POINTER_TYPE]: Likewise.
510         * error.c (dump_aggr_type): Fix lambda detection.
511         (dump_simple_decl): Pretty-print capture field.
513         N3323
514         * cvt.c (build_expr_type_conversion): Two conversions that return
515         the same type aren't necessarily ambiguous.
517         N3648
518         * parser.c (cp_parser_lambda_introducer): Make lambda capture init
519         pedwarn unconditional except in C++1y mode.
521         * semantics.c (potential_constant_expression_1): Don't crash on
522         'this' in NSDMI.
524         Core 1612
525         * semantics.c (finish_id_expression): Reject capture of anonymous
526         union member.
528         Core 1609
529         * decl2.c (check_default_args): Check for pack expansion.
531         * mangle.c (write_type): Mangle decltype(auto).
533 2013-04-19  Jason Merrill  <jason@redhat.com>
535         N3638 changes to return type deduction
536         * decl.c (undeduced_auto_decl): New.
537         (require_deduced_type): New.
538         (fndecl_declared_return_type): New.
539         (decls_match): Use it.
540         (duplicate_decls): Don't check for auto return.
541         (grokdeclarator): Reject virtual auto.
542         * class.c (resolve_address_of_overloaded_function): Handle
543         auto function templates.
544         * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
545         * cp-tree.h: Declare new fns.
546         * error.c (dump_function_decl): Use fndecl_declared_return_type.
547         * search.c (check_final_overrider): Likewise.
548         * pt.c (make_decltype_auto): New.
549         (do_auto_deduction): Require plain decltype(auto).
550         (is_auto): Adjust.
552         DR 941
553         * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
554         template specializations.
556 2013-04-16  Ed Smith-Rowland  <3dw4rd@verizon.net>
558         Implement n3599 - Literal operator templates for strings.
559         * parser.c (make_string_pack (tree value)): New function.
560         (cp_parser_userdef_string_literal (cp_token *)): Use it
561         to construct calls to character string literal operator templates.
562         (cp_parser_template_declaration_after_export): Check for new string
563         literal operator template parameter form.
565 2013-04-15  Jason Merrill  <jason@redhat.com>
567         * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
569         PR c++/52748
570         * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
571         rather than a destructor name, it isn't an unqualified-name.
572         (tsubst_copy_and_build): Pass down decltype_flag to operator
573         handling code, too.
575         PR c++/56388
576         * semantics.c (insert_capture_proxy): Just use index 1 in the
577         stmt_list_stack.
579 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
581         * error.c (cp_print_error_function,
582         print_instantiation_partial_context_line,
583         maybe_print_constexpr_context): Colorize locus strings.
585 2013-04-11  Jason Merrill  <jason@redhat.com>
587         PR c++/52748
588         * parser.c (complain_flags): New.
589         (cp_parser_postfix_expression): Use it.
590         (cp_parser_unary_expression): Likewise.
591         (cp_parser_binary_expression): Likewise.
592         (cp_parser_assignment_expression): Likewise.
593         (cp_parser_expression): Likewise.
594         (cp_parser_postfix_open_square_expression): Take decltype_p.
595         (cp_parser_builtin_offsetof): Adjust.
596         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
597         * decl2.c (grok_array_decl): Add decltype_p parm.
598         * cp-tree.h: Adjust prototype.
599         * semantics.c (finish_unary_op_expr): Add complain parm.
601 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
603         PR c++/56895
604         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
605         calling maybe_constant_value for C++98.
607 2013-04-11  Jason Merrill  <jason@redhat.com>
609         PR c++/56901
610         * semantics.c (lambda_capture_field_type, lambda_proxy_type):
611         Strip references before checking WILDCARD_TYPE_P.
613 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
615         * call.c (build_conditional_expr_1, build_over_call): Protect
616         error calls with complain & tf_error.
617         * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
618         build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
619         build_ptrmemfunc): Likewise.
620         (lookup_destructor): Take tsubst_flags_t parameter, adjust.
622         * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
623         (convert_to_reference): Adjust.
625 2013-04-11  Jason Merrill  <jason@redhat.com>
627         * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
628         local variables, look them up instead.
629         (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
630         proxies and substitution in unevaluated context.
631         (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
632         before the iterators.
634         PR c++/23055
635         * pt.c (uses_deducible_template_parms): New.
636         (deducible_array_bound, deducible_expression): New.
637         (deducible_template_args): New.
638         (unify_one_argument): Call uses_deducible_template_parms.
640 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
642         PR c++/56913
643         * typeck2.c (build_m_component_ref): Protect error calls with
644         (complain & tf_error).
646 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
648         PR c++/54216
649         * parser.c (cp_parser_enum_specifier): Check for empty
650         anonymous enums and anonymous scoped enums.
652 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
654         PR c++/56895
655         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
656         first before calling maybe_constant_value for warn_for_div_by_zero
657         or invalid shift count warning purposes.
659 2013-04-09  Jason Merrill  <jason@redhat.com>
661         PR c++/25466
662         * rtti.c (build_typeid): Check the address of the argument
663         rather than looking for an INDIRECT_REF.
665 2013-04-04  Jason Merrill  <jason@redhat.com>
667         PR c++/56838
668         PR c++/17232
669         * typeck2.c (abstract_virtuals_error_sfinae): Disable
670         complete_type again.
672 2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
674         PR c++/56871
675         * decl.c (validate_constexpr_redeclaration): Allow an explicit
676         specialization to be different wrt the constexpr specifier.
678 2013-04-06  Jason Merrill  <jason@redhat.com>
680         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
681         noreturn attribute.
683 2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>
685         * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
686         cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.
688 2013-04-03  Jason Merrill  <jason@redhat.com>
690         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
691         (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
692         (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
694         * mangle.c (write_type): When writing a function type with
695         function-cv-quals, don't add the unqualified type as a
696         substitution candidate.
698 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
700         PR c++/56815
701         * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
702         pedwarn.
704 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
706         PR debug/56819
707         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
708         from args to new_args.
709         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
710         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
712 2013-04-02  Jason Merrill  <jason@redhat.com>
714         PR c++/56821
715         * mangle.c (write_function_type): Mangle ref-qualifier.
716         (write_nested_name): Likewise.
717         (canonicalize_for_substitution): Preserve ref-qualifier.
718         (write_type): Likewise.
720         PR c++/34949
721         * decl.c (begin_destructor_body): Clobber the object in a cleanup.
723 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
725         * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
726         * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
727         (for_each_template_parm_r): Use TYPE_TI_ARGS.
729 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
731         * cp-tree.h (TAGGED_TYPE_P): Remove.
732         (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
733         (TYPE_ANONYMOUS_P): Adjust.
734         * call.c (build_new_op_1): Likewise.
735         * class.c (find_abi_tags_r): Likewise.
736         * decl.c (warn_misplaced_attr_for_class_type, start_decl,
737         type_is_deprecated): Likewise.
738         * decl2.c (grokfield, min_vis_r): Likewise.
739         * pt.c (get_template_info): Likewise.
740         * tree.c (handle_abi_tag_attribute): Likewise.
742 2013-04-01  Jason Merrill  <jason@redhat.com>
744         * semantics.c (maybe_constant_value): Check
745         instantiation_dependent_expression_p.
746         * pt.c (build_non_dependent_expr): Don't check it here.
748         PR c++/56772
749         * init.c (build_new): Don't try to process an array initializer
750         at template definition time.
752         PR c++/56793
753         * typeck.c (finish_class_member_access_expr): Handle enum scope.
755         PR c++/56794
756         * parser.c (cp_parser_range_for): Don't try to do auto deduction
757         in a template if the type of the range is incomplete.
759         * call.c (add_function_candidate): Take the address of 'this' here.
760         (build_over_call): And here.
761         (build_new_method_call_1, build_op_call_1): Not here.
762         (build_user_type_conversion_1): Or here.
763         (add_candidates): Adjust.
765         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
766         * class.c (same_signature_p): Use type_memfn_quals.
767         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
768         FUNCTION_OR_METHOD_TYPE_CHECK.
769         * error.c (dump_type_suffix): Add padding before cv-qualifiers.
770         * pt.c (unify): Use static_fn_type.
772 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
773             Jason Merrill  <jason@redhat.com>
775         Implement N2439 (ref-qualifiers for 'this')
776         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
777         (FUNCTION_RVALUE_QUALIFIED): New.
778         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
779         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
780         (cp_ref_qualifier): New enum.
781         (cp_declarator): Add ref_qualifier.
782         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
783         (cp_parser_direct_declarator): Use it.
784         (make_call_declarator): Adjust.
785         (cp_parser_lambda_declarator_opt): Adjust.
786         * call.c (add_function_candidate): Handle ref-qualifier overload
787         resolution semantics.
788         (standard_conversion): Adjust.
789         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
790         * decl.c (grokdeclarator): Handle ref-qualifiers.
791         (grokfndecl): Check for invalid ref-qualifiers.
792         (static_fn_type, revert_static_member_fn): Adjust.
793         * decl2.c (build_memfn_type): Handle ref-qualifiers.
794         (check_classfn): Check them.
795         (cp_reconstruct_complex_type): Retain them.
796         * error.c (dump_ref_qualifier): New.
797         (dump_type_suffix, dump_function_decl): Use it.
798         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
799         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
800         (unify): Retain them.
801         * tree.c (cp_check_qualified_type): New.
802         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
803         (build_ref_qualified_type): New.
804         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
805         (cp_build_type_attribute_variant): Keep ref-qualifier.
806         * typeck.c (merge_types): Keep ref-qualifier.
807         (structural_comptypes): Compare ref-qualifier.
808         (type_memfn_rqual): New.
809         (apply_memfn_quals): Take ref-qual argument.
810         * typeck2.c (build_m_component_ref): Check ref-qualifier.
812 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
814         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
815         (DECL_FUNCTION_TEMPLATE_P): Adjust.
817         * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
818         pp_cxx_qualified_id): Use get_containing_scope.
819         * parser.c (cp_parser_class_head): Likewise.
820         * pt.c (push_template_decl_real): Likewise.
822         * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
823         * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
825 2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>
827         * decl2.c (collect_candidates_for_java_method_aliases): Use
828         DECL_CLASS_SCOPE_P.
829         * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
830         (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
831         * decl.c (duplicate_decls): Likewise.
832         * parser.c (cp_parser_template_declaration_after_export): Likewise,
833         also DECL_DECLARES_TYPE_P.
834         * pt.c (instantiate_class_template_1): Likewise.
835         * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
836         (lookup_field_r): Likewise.
837         (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
838         (lookup_fnfields_slot_nolazy): Likewise.
839         * semantics.c (finish_member_declaration): Likewise.
840         * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
842 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
844         * pt.c (template_parms_to_args): Fix typo in comment.
846 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
848         * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
850 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
852         * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
853         (build_op_call_1): Likewise.
854         (build_over_call): Likewise.
855         (compare_ics): Likewise.
856         * class.c (build_base_path): Likewise.
857         (resolve_address_of_overloaded_function): Likewise.
858         * cp-tree.h: Likewise.
859         * cvt.c (cp_convert_to_pointer): Likewise.
860         (convert_to_reference): Likewise.
861         (ocp_convert): Likewise.
862         (convert_force): Likewise, tidy.
863         * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
864         (pp_cxx_ptr_operator): Likewise.
865         * decl.c (duplicate_decls): Likewise.
866         (start_decl): Likewise.
867         (grok_op_properties): Likewise.
868         (start_preparsed_function): Likewise.
869         (store_parm_decls): Likewise.
870         (finish_function): Likewise.
871         * decl2.c (delete_sanity): Likewise.
872         (acceptable_java_type): Likewise.
873         (grokbitfield): Likewise.
874         (cp_reconstruct_complex_type): Likewise.
875         * error.c (dump_type_prefix): Likewise.
876         (dump_expr): Likewise.
877         * except.c (push_eh_cleanup): Likewise.
878         (complete_ptr_ref_or_void_ptr_p): Likewise.
879         (can_convert_eh): Likewise.
880         * init.c (build_new_1): Likewise.
881         (build_delete): Likewise.
882         (build_vec_delete): Likewise.
883         * mangle.c (write_type): Likewise.
884         * parser.c (lookup_literal_operator): Likewise.
885         * pt.c (convert_nontype_argument_function): Likewise.
886         (convert_nontype_argument): Likewise.
887         (tsubst): Likewise.
888         (unify): Likewise.
889         (dependent_type_p_r): Likewise.
890         * rtti.c (build_headof): Likewise.
891         (build_typeid): Likewise.
892         (build_dynamic_cast_1): Likewise.
893         (target_incomplete_p): Likewise.
894         (typeinfo_in_lib_p): Likewise.
895         * semantics.c (finish_omp_for): Likewise.
896         (cxx_eval_call_expression): Likewise.
897         (maybe_resolve_dummy): Likewise.
898         * tree.c (build_target_expr): Likewise.
899         (cp_build_qualified_type_real): Likewise.
900         * typeck.c (composite_pointer_type_r): Likewise.
901         (composite_pointer_type): Likewise.
902         (comp_except_types): Likewise.
903         (cxx_sizeof_nowarn): Likewise.
904         (string_conv_p): Likewise.
905         (cp_build_array_ref): Likewise.
906         (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
907         (pointer_diff): Likewise.
908         (cp_build_addr_expr_1): Likewise.
909         (cp_build_unary_op): Likewise.
910         (build_static_cast_1): Likewise.
911         (cp_build_c_cast): Likewise.
912         (comp_ptr_ttypes_real): Likewise.
913         (ptr_reasonably_similar): Likewise.
914         (comp_ptr_ttypes_const): Likewise.
915         (casts_away_constness): Likewise.
916         (check_literal_operator_args): Likewise.
917         * typeck2.c (build_x_arrow): Likewise.
918         (add_exception_specifier): Likewise.
920 2013-03-29  Jason Merrill  <jason@redhat.com>
922         N3582
923         * cp-tree.h (AUTO_IS_DECLTYPE): New.
924         * parser.c (cp_parser_decltype): Handle decltype(auto).
925         (cp_parser_type_id_1): Allow auto without a late-specified
926         return in C++1y.
927         (cp_parser_primary_expression): Use the return value of
928         finish_parenthesized_expr.
929         (cp_parser_transaction_expression): Likewise.
930         * semantics.c (force_paren_expr): New.
931         (finish_parenthesized_expr): Use it.
932         * call.c (build_conditional_expr_1): Likewise.
933         * pt.c (do_auto_deduction): Handle decltype(auto).
934         (tsubst_copy): Handle PAREN_EXPR.
935         (tsubst_copy_and_build): Likewise.
936         * error.c (dump_expr): Handle PAREN_EXPR.
937         * cxx-pretty-print.c (pp_cxx_expression): Likewise.
938         * mangle.c (write_expression): Ignore PAREN_EXPR.
940         * parser.c (cp_parser_decltype_expr): Split out...
941         (cp_parser_decltype): ...from here.
943         PR c++/56774
944         PR c++/35722
945         * pt.c (unify_pack_expansion): Fix indexing.
947 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
949         * call.c (build_java_interface_fn_ref): Likewise.
950         (make_temporary_var_for_ref_to_temp): Likewise.
951         * class.c (check_field_decls): Likewise.
952         (layout_class_type): Likewise.
953         (finish_struct_1): Likewise.
954         (fixed_type_or_null): Likewise.
955         (get_vtbl_decl_for_binfo): Likewise.
956         * cp-gimplify.c (omp_var_to_track): Likewise.
957         (cp_genericize_r): Likewise.
958         * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
959         * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
960         (DECL_DISCRIMINATOR_P): Likewise.
961         * decl.c (poplevel): Likewise.
962         (decls_match): Likewise.
963         (duplicate_decls): Likewise.
964         (decl_jump_unsafe): Likewise.
965         (start_decl): Likewise.
966         (check_for_uninitialized_const_var): Likewise.
967         (make_rtl_for_nonlocal_decl): Likewise.
968         (cp_finish_decl): Likewise.
969         (expand_static_init): Likewise.
970         (local_variable_p): Likewise.
971         (maybe_register_incomplete_var): Likewise.
972         * decl2.c (grokfield): Likewise.
973         (comdat_linkage): Likewise.
974         (determine_visibility): Likewise.
975         (import_export_decl): Likewise.
976         (prune_vars_needing_no_initialization): Likewise.
977         (decl_maybe_constant_var_p): Likewise.
978         * error.c (dump_simple_decl): Likewise.
979         (dump_template_decl): Likewise.
980         (cp_printer): Likewise.
981         * except.c (build_throw): Likewise.
982         * init.c (build_vtbl_address): Likewise.
983         (member_init_ok_or_else): Likewise.
984         (build_aggr_init): Likewise.
985         (expand_aggr_init_1): Likewise.
986         (build_offset_ref): Likewise.
987         (constant_value_1): Likewise.
988         * mangle.c (write_mangled_name): Likewise.
989         (write_prefix): Likewise.
990         * name-lookup.c (supplement_binding_1): Likewise.
991         (add_decl_to_level): Likewise.
992         (pushdecl_maybe_friend_1): Likewise.
993         (check_for_out_of_scope_variable): Likewise.
994         (validate_nonmember_using_decl): Likewise.
995         (lookup_name_innermost_nonclass_level_1): Likewise.
996         (lookup_arg_dependent_1): Likewise.
997         * parser.c (cp_parser_lambda_introducer): Likewise.
998         (cp_parser_template_argument): Likewise.
999         (cp_parser_single_declaration): Likewise.
1000         * pt.c (convert_nontype_argument): Likewise.
1001         (instantiate_class_template_1): Likewise.
1002         (tsubst_decl): Likewise.
1003         (tsubst_expr): Likewise.
1004         (do_decl_instantiation): Likewise.
1005         (do_type_instantiation): Likewise.
1006         (regenerate_decl_from_template): Likewise.
1007         (always_instantiate_p): Likewise.
1008         (instantiate_decl): Likewise.
1009         (type_dependent_expression_p): Likewise.
1010         (build_non_dependent_expr): Likewise.
1011         * repo.c (repo_emit_p): Likewise.
1012         * rtti.c (build_dynamic_cast_1): Likewise.
1013         * search.c (shared_member_p): Likewise.
1014         * semantics.c (outer_var_p): Likewise.
1015         (finish_id_expression): Likewise.
1016         (finish_omp_clauses): Likewise.
1017         (finish_decltype_type): Likewise.
1018         (ensure_literal_type_for_constexpr_object): Likewise.
1019         * tree.c (lvalue_kind): Likewise.
1020         (bot_replace): Likewise.
1021         (cp_tree_equal): Likewise.
1022         (handle_init_priority_attribute): Likewise.
1023         (decl_storage_duration): Likewise.
1024         * typeck.c (cxx_sizeof_expr): Likewise.
1025         (cxx_alignof_expr): Likewise.
1026         (decay_conversion): Likewise.
1027         (build_class_member_access_expr): Likewise.
1028         (cp_build_array_ref): Likewise.
1029         (cxx_mark_addressable): Likewise.
1030         (maybe_warn_about_returning_address_of_local): Likewise.
1031         (check_return_expr): Likewise.
1032         * typeck2.c (cxx_readonly_error): Likewise.
1033         (abstract_virtuals_error_sfinae): Likewise.
1034         (cxx_incomplete_type_diagnostic): Likewise.
1036 2013-03-28  Lawrence Crowl  <crowl@google.com>
1038         * Make-lang.in
1039         (CXX_PARSER_H): Add header dependence.
1040         * cp-tree.h
1041         (extern debug (cp_binding_level &)): New.
1042         (extern debug (cp_binding_level *)): New.
1043         * name-lookup.h
1044         (debug (cp_binding_level &)): New.
1045         (debug (cp_binding_level *)): New.
1046         * parser.c
1047         (debug (cp_parser &)): New.
1048         (debug (cp_parser *)): New.
1049         (debug (cp_token &)): New.
1050         (debug (cp_token *)): New.
1051         (debug (vec<cp_token, va_gc> &)): New.
1052         (debug (vec<cp_token, va_gc> *)): New.
1053         * parser.c: Add header dependence.
1054         (extern debug (cp_parser &)): New.
1055         (extern debug (cp_parser *)): New.
1056         (extern debug (cp_token &)): New.
1057         (extern debug (cp_token *)): New.
1058         (extern debug (vec<cp_token, va_gc> &)): New.
1059         (extern debug (vec<cp_token, va_gc> *)): New.
1061 2013-03-28  Jason Merrill  <jason@redhat.com>
1063         PR c++/17232
1064         PR c++/52748
1065         * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
1066         the type if tf_decltype is set.
1067         * pt.c (fn_type_unification): Add decltype_p parm.
1068         (get_bindings): Adjust.
1069         * cp-tree.h: Adjust.
1070         * class.c (resolve_address_of_overloaded_function): Adjust.
1071         * call.c (add_template_candidate_real, print_z_candidate): Adjust.
1073         PR c++/56679
1074         * parser.c (cp_parser_sizeof_pack): Split out from...
1075         (cp_parser_sizeof_operand): ...here.  Require (id).
1077         PR c++/56701
1078         * semantics.c (finish_this_expr): 'this' is an rvalue.
1079         * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
1081         PR c++/56710
1082         * semantics.c (finish_member_declaration): Don't push closure
1083         members.
1085         * name-lookup.c (pushdecl_maybe_friend_1): Use
1086         nonlambda_method_basetype and current_nonlambda_class_type.
1088         PR c++/56728
1089         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
1090         conversion from integer to pointer.
1091         (cxx_eval_constant_expression): Likewise.
1092         (cxx_eval_indirect_ref): Use the folded operand if we still think
1093         this might be constant.
1095 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
1096             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1098         PR c++/56725
1099         * call.c (convert_like_real): Change series of two permerrors
1100         to permerror + inform (and likewise for two errors).
1101         (build_new_method_call_1): Likewise.
1102         * typeck.c (convert_for_initialization): Change additional
1103         warning or error to inform.
1105 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1107         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
1108         (first_aggr_init_expr): Likewise.
1109         (more_aggr_init_expr_args_p): Likewise.
1110         (type_of_this_parm): Likewise.
1111         (class_of_this_parm): Likewise.
1112         * name-lookup.h (get_global_value_if_present): Likewise.
1113         (is_typename_at_global_scope): Likewise.
1115 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
1117         * call.c (joust): Don't call inform for a permerror returning false.
1118         * parser.c (cp_parser_check_class_key): Likewise.
1119         * pt.c (tsubst_copy_and_build): Likewise.
1121 2013-03-27  Jason Merrill  <jason@redhat.com>
1123         PR c++/56749
1124         * semantics.c (finish_qualified_id_expr): Return early
1125         for enum scope.
1127 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1129         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1130         * cvt.c (convert_to_void): Likewise.
1131         * error.c (dump_expr): Likewise.
1132         * mangle.c (write_expression): Likewise.
1133         * parser.c (cp_parser_template_argument): Likewise.
1134         * pt.c (convert_nontype_argument): Likewise.
1135         (tsubst_copy_and_build): Likewise.
1136         * rtti.c (build_typeid): Likewise.
1137         * semantics.c (finish_call_expr): Likewise.
1138         (finish_decltype_type): Likewise.
1139         (build_data_member_initialization): Likewise.
1140         * tree.c (is_dummy_object): Likewise.
1141         * typeck.c (decay_conversion): Likewise.
1142         (build_class_member_access_expr): Likewise.
1143         (cp_build_addr_expr_1): Likewise.
1144         (unary_complex_lvalue): Likewise.
1145         (check_return_expr): Likewise.
1146         * typeck2.c (cxx_readonly_error): Likewise.
1148 2013-03-26  Jason Merrill  <jason@redhat.com>
1150         PR c++/52597
1151         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
1152         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
1153         * cp-tree.h: Adjust prototype.
1155         PR c++/45282
1156         * typeck2.c (build_m_component_ref): Handle prvalue object.
1158 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1160         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
1161         * decl.c (duplicate_decls): Likewise.
1162         (cp_finish_decl): Likewise.
1163         (check_class_member_definition_namespace): Likewise.
1164         * decl2.c (grokfield): Likewise.
1165         (decl_needed_p): Likewise.
1166         (import_export_decl): Likewise.
1167         (mark_used): Likewise.
1168         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1169         * pt.c (push_access_scope): Likewise.
1170         (instantiate_decl): Likewise.
1171         * ptree.c (cxx_print_decl): Likewise.
1172         * repo.c (repo_emit_p): Likewise.
1173         * semantics.c (note_decl_for_pch): Likewise.
1174         * tree.c (decl_linkage): Likewise.
1176 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
1178         PR c++/55951
1179         * decl.c (check_array_designated_initializer): Handle CONST_DECL
1180         as ce->index.
1182 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
1184         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
1185         error messages.
1187         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
1189 2013-03-25  Jason Merrill  <jason@redhat.com>
1191         PR c++/56699
1192         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
1193         class is derived from the type of the object.
1195         PR c++/52014
1196         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
1197         unevaluated context.
1199 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
1201         PR c++/56722
1202         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
1203         DECL_TEMPLATE_INSTANTIATION.
1205 2013-03-22  Jason Merrill  <jason@redhat.com>
1207         PR c++/56684
1208         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
1209         and CONST_DECL.
1211 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1213         * cp-tree.h (identifier_p): New.
1214         * call.c: Throughout, call identifier_p insstead of direct
1215         comparaison of TREE_CODE against IDENTIFIER_NODE.
1216         * decl.c: Likewisse.
1217         * decl2.c: Likewise.
1218         * init.c: Likewise.
1219         * mangle.c: Likewise.
1220         * name-lookup.c: Likewise.
1221         * parser.c: Likewise.
1222         * pt.c: Likewise.
1223         * search.c: Likewise.
1224         * semantics.c: Likewise.
1225         * tree.c: Likewise.
1226         * typeck.c: Likewise.
1227         * typeck2.c: Likewise.
1229 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
1231         PR middle-end/48087
1232         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
1233         * call.c (build_temp): Likewise.
1234         * method.c (synthesize_method): Likewise.
1235         * typeck.c (convert_for_initialization): Likewise.
1237 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
1239         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
1241 2013-03-21  Richard Biener  <rguenther@suse.de>
1243         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
1244         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
1246 2013-03-20  Jason Merrill  <jason@redhat.com>
1248         PR c++/56646
1249         * parser.c (cp_parser_late_return_type_opt): Save and restore
1250         current_class_ptr/ref.
1252         PR c++/54532
1253         * expr.c (cplus_expand_constant): Do nothing if the class is
1254         incomplete.
1255         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
1256         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
1257         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
1258         (complete_vars): Likewise.
1260         * name-lookup.c (get_anonymous_namespace_name): Never use
1261         get_file_function_name.
1263         * pt.c (retrieve_specialization): Handle null tmpl argument.
1265         PR c++/17232
1266         PR c++/56642
1267         * pt.c (tsubst_decl): Check return value of register_specialization.
1268         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
1269         change.
1271 2013-03-17  Jason Merrill  <jason@redhat.com>
1273         PR c++/54359
1274         PR c++/56639
1275         * parser.c (cp_parser_direct_declarator): Bail if we see a
1276         qualified-id not at namespace scope.
1278         PR c++/17232
1279         PR c++/56642
1280         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
1281         change for now.
1283 2013-03-16  Jason Merrill  <jason@redhat.com>
1285         * decl.c (grokdeclarator): Assert that we won't see a pointer to
1286         METHOD_TYPE.
1288         PR c++/54277
1289         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
1290         (MAYBE_CLASS_TYPE_P): ...here.
1291         * semantics.c (lambda_capture_field_type): Only build a
1292         magic decltype for wildcard types.
1293         (lambda_proxy_type): Likewise.
1294         (finish_non_static_data_member): Get the quals from
1295         the object.
1297         PR c++/55931
1298         * parser.c (cp_parser_template_argument): Don't
1299         fold_non_dependent_expr.
1301         * parser.c (cp_parser_lambda_declarator_opt): Use
1302         cp_parser_trailing_type_id.
1304         PR c++/45917
1305         * parser.c (cp_parser_template_id): Don't forget access checks.
1307         PR c++/52374
1308         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
1310         PR c++/54764
1311         PR c++/55972
1312         * name-lookup.h (tag_scope): Add ts_lambda.
1313         * semantics.c (begin_lambda_type): Use it.
1314         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
1315         * pt.c (check_default_tmpl_args): Ignore lambdas.
1316         (push_template_decl_real): Handle lambdas.
1317         * tree.c (no_linkage_check): Adjust lambda check.
1319         PR c++/56039
1320         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
1322         PR c++/54359
1323         * parser.c (cp_parser_direct_declarator): Fix late return
1324         for out-of-class defn of member function.
1326         PR c++/55357
1327         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
1328         parms to avoid duplicate -Wshadow warnings.
1330         * search.c (lookup_base): Handle NULL_TREE.
1332         PR c++/56481
1333         * semantics.c (potential_constant_expression_1): Use of 'this' in
1334         a non-constexpr function makes the expression not potentially
1335         constant.
1337         N3276
1338         PR c++/52748
1339         * cp-tree.h (tsubst_flags): Add tf_decltype.
1340         * call.c (build_cxx_call): Don't build a temporary if it's set.
1341         (build_over_call): Make sure it's only passed to build_cxx_call.
1342         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
1343         (cp_parser_unary_expression): Likewise.
1344         (cp_parser_cast_expression): Likewise.
1345         (cp_parser_binary_expression): Likewise.
1346         (cp_parser_assignment_expression): Likewise.
1347         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
1348         (cp_parser_expression): Add decltype_p.  Force a
1349         temporary for a call on the LHS of a comma.
1350         (cp_parser_decltype): Pass true to decltype_p parms.
1351         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
1352         (tsubst_copy_and_build): Pass tf_decltype down only for
1353         CALL_EXPR and the RHS of COMPOUND_EXPR.
1354         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
1356         * cp-tree.h (abstract_class_use): New enum.
1357         * typeck2.c (pending_abstract_type): Add use field.
1358         (abstract_virtuals_error_sfinae): Add overloads taking
1359         abstract_class_use instead of tree.
1360         * typeck.c (build_static_cast_1): Call it.
1361         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
1362         * pt.c: Adjust calls.
1363         * decl.c (cp_finish_decl): Don't handle functions specially.
1364         (grokdeclarator): Always check return type.
1365         * init.c (build_new_1): Adjust call.
1367         DR 337
1368         PR c++/17232
1369         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
1370         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
1372         DR 657
1373         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
1374         (tsubst_arg_types): Likewise.
1376         DR 1518
1377         PR c++/54835
1378         * call.c (convert_like_real): Check for explicit constructors
1379         even for value-initialization.
1381         PR c++/54946
1382         * pt.c (convert_nontype_argument): Handle invalid pointer.
1384         * parser.c (cp_parser_lambda_expression): Use nreverse.
1386         PR c++/56447
1387         PR c++/55532
1388         * pt.c (instantiate_class_template_1): Instantiate lambda capture
1389         list here.
1390         (tsubst_copy_and_build): Not here.
1392         PR c++/55017
1393         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
1395         PR c++/55240
1396         * parser.c (parsing_nsdmi): New.
1397         * semantics.c (outer_automatic_var_p): Check it.
1398         (finish_id_expression): Likewise.
1399         * cp-tree.h: Declare it.
1401         PR c++/55241
1402         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
1404         * parser.c (lookup_literal_operator): Correct parm/arg naming
1405         mixup.
1407         PR c++/56238
1408         * pt.c (fold_non_dependent_expr_sfinae): Check
1409         instantiation_dependent_expression_p.
1411         PR c++/56095
1412         * class.c (resolve_address_of_overloaded_function): Accept a
1413         reference to function for target_type.
1414         (instantiate_type): Likewise.
1415         * pt.c (convert_nontype_argument): Pass it to
1416         convert_nontype_argument_function.
1418 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
1420         * tree.c (cp_tree_equal): Fix a pasto.
1422         PR c++/56607
1423         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
1424         pass op1 through maybe_constant_value first.
1426 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
1428         PR c++/56582
1429         * semantics.c (cxx_eval_array_reference): Check for negative index.
1431 2013-03-14  Jason Merrill  <jason@redhat.com>
1433         PR c++/56614
1434         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
1436         PR c++/56346
1437         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
1438         dso_handle parm on targets without __cxa_atexit.
1440 2013-03-11  Jason Merrill  <jason@redhat.com>
1442         PR c++/56567
1443         * typeck.c (check_return_expr): Disallow returning init list here.
1444         * semantics.c (apply_deduced_return_type): Not here.
1446 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
1448         PR c++/51412
1449         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
1450         * error.c (dump_expr): Likewise.
1452 2013-03-08  Jason Merrill  <jason@redhat.com>
1454         PR c++/51884
1455         * class.c (modify_all_vtables): Mangle the vtable name before
1456         entering dfs_walk.
1458         * semantics.c (lambda_expr_this_capture): In unevaluated context,
1459         just return the nearest 'this'.
1461         PR c++/51494
1462         PR c++/52183
1463         PR c++/56222
1464         * tree.c (maybe_dummy_object): Don't capture 'this'.
1465         * semantics.c (maybe_resolve_dummy): New.
1466         (finish_non_static_data_member): Use it.
1467         (finish_qualified_id_expr): Don't test is_dummy_object.
1468         * cp-tree.h: Declare maybe_resolve_dummy.
1469         * call.c (build_new_method_call_1): Use it.
1471         PR c++/56567
1472         * semantics.c (apply_deduced_return_type): Don't allow returning
1473         std::initializer_list.
1475 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
1477         PR c++/56534
1478         * parser.c (cp_parser_elaborated_type_specifier): Don't call
1479         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
1480         * decl.c (check_elaborated_type_specifier): Tidy.
1482 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
1484         PR c++/56543
1485         * tree.c (strip_typedefs): Don't copy args if they are NULL.
1487 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
1489         * parser.c (cp_parser_braced_list): For {} initialize
1490         *non_constant_p to false.
1492 2013-03-04  Jason Merrill  <jason@redhat.com>
1494         PR c++/56464
1495         PR c++/54383
1496         * semantics.c (lambda_expr_this_capture): Handle NSDMI
1497         and non-class scopes.
1499 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
1501         * decl.c (grokdeclarator): Remove dead code.
1503 2013-02-28  Jason Merrill  <jason@redhat.com>
1505         PR c++/56481
1506         * semantics.c (potential_constant_expression_1): Use
1507         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
1509         PR c++/56243
1510         * call.c (build_over_call): Avoid virtual lookup in a template.
1512 2013-02-27  Jason Merrill  <jason@redhat.com>
1514         PR c++/56358
1515         PR c++/56323
1516         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
1517         of the base name for inheriting ctors.
1518         (push_class_level_binding_1): Remove inheriting ctor handling.
1519         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
1520         * class.c (add_implicitly_declared_members): Adjust.
1522 2013-02-26  David Binderman  <dcb314@hotmail.com>
1524         PR c++/55632
1525         * decl.c (grokdeclarator): Tidy publicp assignment.
1527 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
1529         PR c++/56419
1530         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
1531         (build_transaction_expr): Same.
1533 2013-02-25  Jason Merrill  <jason@redhat.com>
1535         PR c++/56377
1536         * pt.c (fn_type_unification): Wait to call push_tinst_level until
1537         we know what args we're looking at.
1539         PR c++/56438
1540         * semantics.c (potential_constant_expression_1): In C++98, a cast
1541         to non-integral type can't be a constant expression.
1543 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
1545         PR c++/56403
1546         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
1547         of CLASS_TYPE_P.
1549 2013-02-22  Jason Merrill  <jason@redhat.com>
1551         PR c++/40405
1552         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
1553         if we got the wrong number of template parms.
1555         PR c++/56377
1556         * pt.c (fn_type_unification): Use explicit args in template
1557         instantiation context.
1559         PR c++/56359
1560         * call.c (can_convert_arg): Discard access checks.
1562         PR c++/56395
1563         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
1564         args.
1566 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
1568         PR c++/56373
1569         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
1570         * cvt.c (ocp_convert): Use the latter.
1571         (cp_convert_to_pointer): Likewise.
1572         * decl.c (check_default_argument): Likewise.
1573         * typeck.c (cp_build_binary_op): Likewise.
1574         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
1576 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
1577             Paolo Carlini  <paolo.carlini@oracle.com>
1579         PR c++/51242
1580         * decl2.c (grokbitfield): Allow scoped enumeration types.
1582 2013-02-15  Jason Merrill  <jason@redhat.com>
1584         PR c++/54276
1585         * semantics.c (finish_id_expression): Also return the identifier
1586         for an outer local static.
1588         PR c++/56343
1589         * class.c (check_bases_and_members): Deduce noexcept after
1590         checking bases.
1592         PR c++/52026
1593         * semantics.c (finish_id_expression): In a template, return
1594         the identifier for a constant variable.
1596 2013-02-14  Jason Merrill  <jason@redhat.com>
1598         PR c++/54922
1599         * semantics.c (build_anon_member_initialization): New.
1600         (build_data_member_initialization): Use it.
1602         PR c++/55003
1603         * decl.c (cp_finish_decl): Force instantiation of an
1604         auto static data member.
1606         PR c++/55220
1607         * pt.c (unify): A pack expansion that is not the last template
1608         argument makes the entire template argument list non-deduced.
1610         PR c++/56323
1611         * name-lookup.c (do_class_using_decl): Handle typedefs with
1612         inheriting constructors.
1613         (push_class_level_binding_1): Allow inheriting from template
1614         template parameter, too.
1615         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
1617         PR c++/55223
1618         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
1619         default argument scope.
1620         * mangle.c (write_name): Likewise.
1622         PR c++/55232
1623         * error.c (find_typenames_r): Don't walk into a pack expansion.
1625 2013-02-13  Jason Merrill  <jason@redhat.com>
1627         PR c++/55670
1628         * parser.c (cp_parser_member_declaration): Check the declarator
1629         form when detecting a function declaration via typedef.
1631         PR c++/55680
1632         * pt.c (maybe_process_partial_specialization): A lambda
1633         isn't what's being specialized.
1635         PR c++/55710
1636         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
1637         TREE_USED.
1639         PR c++/55879
1640         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
1642         PR c++/55993
1643         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
1644         non-zero offsets, too.
1646         PR c++/56155
1647         * decl.c (build_enumerator): Always convert the value to a
1648         fixed underlying type.
1650         PR c++/56135
1651         * pt.c (tsubst_copy_and_build): Don't forget any new
1652         captures that arose from use of dependent names.
1654 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
1656         PR c++/56302
1657         * semantics.c (finish_asm_stmt): If input constraints allow
1658         neither register nor memory, try maybe_constant_value to get
1659         a constant if possible.
1661 2013-02-12  Jason Merrill  <jason@redhat.com>
1663         PR c++/56285
1664         * method.c (add_one_base_init): Handle base constructor
1665         taking rvalue reference parm.
1667         PR c++/56291
1668         * semantics.c (sort_constexpr_mem_initializers): Handle
1669         vptr out of order.
1671 2013-02-09  Jason Merrill  <jason@redhat.com>
1673         PR c++/56268
1674         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
1675         maybe_instantiate_noexcept.
1677         PR c++/56247
1678         * pt.c (eq_specializations): Set comparing_specializations.
1679         * tree.c (cp_tree_equal): Check it.
1680         * cp-tree.h: Declare it.
1682         * decl.c (decls_match): Check versions later.
1684         PR c++/56238
1685         * pt.c (build_non_dependent_expr): Don't try to fold
1686         instantiation-dependent expressions.
1687         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
1688         [BIND_EXPR]: Treat as dependent.
1690 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
1692         PR c++/56241
1693         * init.c (build_vec_init): Don't append NULL values into new_vec.
1694         (build_zero_init_1): Don't push anything into v if recursive call
1695         returned NULL_TREE.
1696         (build_value_init_noctor): Don't push anything into v if
1697         build_value_init call returned NULL_TREE.
1699         PR c++/56239
1700         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
1701         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
1702         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
1703         return true only if 2nd token isn't CPP_CLOSE_PAREN.
1704         (cp_parser_cast_expression): Adjust caller.
1706         PR c++/56237
1707         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
1708         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
1709         DECL_LANG_SPECIFIC (t).
1711 2013-02-07  Jason Merrill  <jason@redhat.com>
1713         PR c++/56235
1714         * method.c (do_build_copy_constructor): Don't bother turning
1715         scalars from lvalues to xvalues.
1716         (do_build_copy_assign): Likewise.
1718 2013-02-06  Jason Merrill  <jason@redhat.com>
1720         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
1722 2013-02-05  Jason Merrill  <jason@redhat.com>
1724         PR c++/54122
1725         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
1726         METHOD_TYPE.
1728         PR c++/56177
1729         * decl.c (start_preparsed_function): Update restype if we change
1730         decl1.
1732         PR c++/56208
1733         * pt.c (fn_type_unification): Discard any access checks from
1734         substituting explicit args.
1736 2013-01-31  Jason Merrill  <jason@redhat.com>
1738         PR c++/56162
1739         PR c++/56104
1740         * typeck.c (get_member_function_from_ptrfunc): Fix
1741         ptrmemfunc_vbit_in_delta case.
1743 2013-01-29  Jason Merrill  <jason@redhat.com>
1745         PR libstdc++/54314
1746         * class.c (build_ctor_vtbl_group): Give construction vtables
1747         hidden visibility.
1749 2013-01-25  Jason Merrill  <jason@redhat.com>
1751         PR c++/56095
1752         * pt.c (convert_nontype_argument_function): Handle invalid input.
1753         (convert_nontype_argument): Likewise.
1755         PR c++/56104
1756         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
1757         dynamic type has no virtual functions.
1759 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
1761         PR c++/55944
1762         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
1763         on TARGET_EXPR nodes.
1765 2013-01-22  Jason Merrill  <jason@redhat.com>
1767         PR c++/56071
1768         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
1770 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
1772         PR c++/53609
1773         * pt.c (argument_pack_element_is_expansion_p)
1774         (make_argument_pack_select, use_pack_expansion_extra_args_p)
1775         (gen_elem_of_pack_expansion_instantiation): New static functions.
1776         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
1777         look through the possibly resulting pack expansion as well.
1778         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
1779         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
1780         Use gen_elem_of_pack_expansion_instantiation to build the
1781         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
1782         as gen_elem_of_pack_expansion_instantiation and the change in
1783         tsubst above generalize this particular case.
1784         (arg_from_parm_pack_p): Remove this for it's not used by
1785         tsubst_pack_expansion anymore.
1787 2013-01-21  Jason Merrill  <jason@redhat.com>
1789         PR c++/56059
1790         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
1791         template args count.
1793 2013-01-18  Jason Merrill  <jason@redhat.com>
1795         PR target/54908
1796         * decl2.c (get_local_tls_init_fn): New.
1797         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
1798         with aliases for internal variables.  Don't use weakrefs if
1799         the variable needs destruction.
1800         (generate_tls_wrapper): Mark the wrapper as const if no
1801         initialization is needed.
1802         (handle_tls_init): Don't require aliases.
1804 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
1806         PR c++/55663
1807         * pt.c (coerce_innermost_template_parms): New static function.
1808         (instantiate_alias_template):  Use it here.
1810 2013-01-09  Jason Merrill  <jason@redhat.com>
1812         PR c++/55878
1813         * rtti.c (build_typeid, get_typeid): Add complain parm.
1814         (get_tinfo_decl_dynamic): Likewise.
1815         * cp-tree.h, parser.c, pt.c: Adjust.
1817         PR c++/55893
1818         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
1819         needs destruction.
1821 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
1823         PR c/48418
1824         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
1825         call maybe_constant_value for the negative or too big shift
1826         count warnings.
1828 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
1830         PR c++/55801
1831         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
1832         of the argument is true.
1834 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
1836         * parser.c (cp_parser_initializer_list): Move declaration
1837         of variable non_const to start of lexical block.
1839 2013-01-07  Jason Merrill  <jason@redhat.com>
1841         PR c++/55753
1842         * tree.c (build_aggr_init_expr): Do nothing in a template.
1843         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
1844         a FUNCTION_DECL before tsubsting.
1846 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
1848         PR c++/52343
1849         * pt.c (check_instantiated_arg): Allow type template arguments.
1851 2013-01-04  Jason Merrill  <jason@redhat.com>
1853         PR c++/55877
1854         * decl.c (reset_type_linkage, bt_reset_linkage): New.
1855         (grokdeclarator): Use reset_type_linkage.
1856         * name-lookup.c (binding_table_foreach): Handle null table.
1857         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
1859 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
1861         PR c++/54526 (again)
1862         * parser.c (cp_parser_template_id): Revert core of previous change
1863         (keep adjusted inform message).
1865 2013-01-03  Jason Merrill  <jason@redhat.com>
1867         PR c++/55419
1868         PR c++/55753
1869         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
1870         TREE_CONSTANT.
1872         PR c++/55842
1873         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
1875         PR c++/55856
1876         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
1878         PR c++/53650
1879         * call.c (type_has_extended_temps): New.
1880         * cp-tree.h: Declare it.
1881         * decl.c (check_initializer): Use build_aggr_init for arrays
1882         if it is false.
1883         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
1885 2013-01-02  Jason Merrill  <jason@redhat.com>
1887         PR c++/54325
1888         * call.c (build_new_method_call_1): Don't use build_value_init for
1889         user-provided default constructors.
1891         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
1893         PR c++/55032
1894         PR c++/55245
1895         * tree.c (build_cplus_array_type): Copy layout information
1896         to main variant if necessary.
1898 Copyright (C) 2013 Free Software Foundation, Inc.
1900 Copying and distribution of this file, with or without modification,
1901 are permitted in any medium without royalty provided the copyright
1902 notice and this notice are preserved.