PR c++/56728
[official-gcc.git] / gcc / cp / ChangeLog
blob164c79700cac706cc51e5d88dda44281f5d1a280
1 2013-03-28  Jason Merrill  <jason@redhat.com>
3         PR c++/56728
4         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
5         conversion from integer to pointer.
6         (cxx_eval_constant_expression): Likewise.
7         (cxx_eval_indirect_ref): Use the folded operand if we still think
8         this might be constant.
10 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
11             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
13         PR c++/56725
14         * call.c (convert_like_real): Change series of two permerrors
15         to permerror + inform (and likewise for two errors).
16         (build_new_method_call_1): Likewise.
17         * typeck.c (convert_for_initialization): Change additional
18         warning or error to inform.
20 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
22         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
23         (first_aggr_init_expr): Likewise.
24         (more_aggr_init_expr_args_p): Likewise.
25         (type_of_this_parm): Likewise.
26         (class_of_this_parm): Likewise.
27         * name-lookup.h (get_global_value_if_present): Likewise.
28         (is_typename_at_global_scope): Likewise.
30 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
32         * call.c (joust): Don't call inform for a permerror returning false.
33         * parser.c (cp_parser_check_class_key): Likewise.
34         * pt.c (tsubst_copy_and_build): Likewise.
36 2013-03-27  Jason Merrill  <jason@redhat.com>
38         PR c++/56749
39         * semantics.c (finish_qualified_id_expr): Return early
40         for enum scope.
42 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
44         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
45         * cvt.c (convert_to_void): Likewise.
46         * error.c (dump_expr): Likewise.
47         * mangle.c (write_expression): Likewise.
48         * parser.c (cp_parser_template_argument): Likewise.
49         * pt.c (convert_nontype_argument): Likewise.
50         (tsubst_copy_and_build): Likewise.
51         * rtti.c (build_typeid): Likewise.
52         * semantics.c (finish_call_expr): Likewise.
53         (finish_decltype_type): Likewise.
54         (build_data_member_initialization): Likewise.
55         * tree.c (is_dummy_object): Likewise.
56         * typeck.c (decay_conversion): Likewise.
57         (build_class_member_access_expr): Likewise.
58         (cp_build_addr_expr_1): Likewise.
59         (unary_complex_lvalue): Likewise.
60         (check_return_expr): Likewise.
61         * typeck2.c (cxx_readonly_error): Likewise.
63 2013-03-26  Jason Merrill  <jason@redhat.com>
65         PR c++/52597
66         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
67         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
68         * cp-tree.h: Adjust prototype.
70         PR c++/45282
71         * typeck2.c (build_m_component_ref): Handle prvalue object.
73 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
75         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
76         * decl.c (duplicate_decls): Likewise.
77         (cp_finish_decl): Likewise.
78         (check_class_member_definition_namespace): Likewise.
79         * decl2.c (grokfield): Likewise.
80         (decl_needed_p): Likewise.
81         (import_export_decl): Likewise.
82         (mark_used): Likewise.
83         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
84         * pt.c (push_access_scope): Likewise.
85         (instantiate_decl): Likewise.
86         * ptree.c (cxx_print_decl): Likewise.
87         * repo.c (repo_emit_p): Likewise.
88         * semantics.c (note_decl_for_pch): Likewise.
89         * tree.c (decl_linkage): Likewise.
91 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
93         PR c++/55951
94         * decl.c (check_array_designated_initializer): Handle CONST_DECL
95         as ce->index.
97 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
99         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
100         error messages.
102         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
104 2013-03-25  Jason Merrill  <jason@redhat.com>
106         PR c++/56699
107         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
108         class is derived from the type of the object.
110         PR c++/52014
111         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
112         unevaluated context.
114 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
116         PR c++/56722
117         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
118         DECL_TEMPLATE_INSTANTIATION.
120 2013-03-22  Jason Merrill  <jason@redhat.com>
122         PR c++/56684
123         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
124         and CONST_DECL.
126 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
128         * cp-tree.h (identifier_p): New.
129         * call.c: Throughout, call identifier_p insstead of direct
130         comparaison of TREE_CODE against IDENTIFIER_NODE.
131         * decl.c: Likewisse.
132         * decl2.c: Likewise.
133         * init.c: Likewise.
134         * mangle.c: Likewise.
135         * name-lookup.c: Likewise.
136         * parser.c: Likewise.
137         * pt.c: Likewise.
138         * search.c: Likewise.
139         * semantics.c: Likewise.
140         * tree.c: Likewise.
141         * typeck.c: Likewise.
142         * typeck2.c: Likewise.
144 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
146         PR middle-end/48087
147         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
148         * call.c (build_temp): Likewise.
149         * method.c (synthesize_method): Likewise.
150         * typeck.c (convert_for_initialization): Likewise.
152 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
154         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
156 2013-03-21  Richard Biener  <rguenther@suse.de>
158         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
159         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
161 2013-03-20  Jason Merrill  <jason@redhat.com>
163         PR c++/56646
164         * parser.c (cp_parser_late_return_type_opt): Save and restore
165         current_class_ptr/ref.
167         PR c++/54532
168         * expr.c (cplus_expand_constant): Do nothing if the class is
169         incomplete.
170         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
171         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
172         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
173         (complete_vars): Likewise.
175         * name-lookup.c (get_anonymous_namespace_name): Never use
176         get_file_function_name.
178         * pt.c (retrieve_specialization): Handle null tmpl argument.
180         PR c++/17232
181         PR c++/56642
182         * pt.c (tsubst_decl): Check return value of register_specialization.
183         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
184         change.
186 2013-03-17  Jason Merrill  <jason@redhat.com>
188         PR c++/54359
189         PR c++/56639
190         * parser.c (cp_parser_direct_declarator): Bail if we see a
191         qualified-id not at namespace scope.
193         PR c++/17232
194         PR c++/56642
195         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
196         change for now.
198 2013-03-16  Jason Merrill  <jason@redhat.com>
200         * decl.c (grokdeclarator): Assert that we won't see a pointer to
201         METHOD_TYPE.
203         PR c++/54277
204         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
205         (MAYBE_CLASS_TYPE_P): ...here.
206         * semantics.c (lambda_capture_field_type): Only build a
207         magic decltype for wildcard types.
208         (lambda_proxy_type): Likewise.
209         (finish_non_static_data_member): Get the quals from
210         the object.
212         PR c++/55931
213         * parser.c (cp_parser_template_argument): Don't
214         fold_non_dependent_expr.
216         * parser.c (cp_parser_lambda_declarator_opt): Use
217         cp_parser_trailing_type_id.
219         PR c++/45917
220         * parser.c (cp_parser_template_id): Don't forget access checks.
222         PR c++/52374
223         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
225         PR c++/54764
226         PR c++/55972
227         * name-lookup.h (tag_scope): Add ts_lambda.
228         * semantics.c (begin_lambda_type): Use it.
229         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
230         * pt.c (check_default_tmpl_args): Ignore lambdas.
231         (push_template_decl_real): Handle lambdas.
232         * tree.c (no_linkage_check): Adjust lambda check.
234         PR c++/56039
235         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
237         PR c++/54359
238         * parser.c (cp_parser_direct_declarator): Fix late return
239         for out-of-class defn of member function.
241         PR c++/55357
242         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
243         parms to avoid duplicate -Wshadow warnings.
245         * search.c (lookup_base): Handle NULL_TREE.
247         PR c++/56481
248         * semantics.c (potential_constant_expression_1): Use of 'this' in
249         a non-constexpr function makes the expression not potentially
250         constant.
252         N3276
253         PR c++/52748
254         * cp-tree.h (tsubst_flags): Add tf_decltype.
255         * call.c (build_cxx_call): Don't build a temporary if it's set.
256         (build_over_call): Make sure it's only passed to build_cxx_call.
257         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
258         (cp_parser_unary_expression): Likewise.
259         (cp_parser_cast_expression): Likewise.
260         (cp_parser_binary_expression): Likewise.
261         (cp_parser_assignment_expression): Likewise.
262         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
263         (cp_parser_expression): Add decltype_p.  Force a
264         temporary for a call on the LHS of a comma.
265         (cp_parser_decltype): Pass true to decltype_p parms.
266         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
267         (tsubst_copy_and_build): Pass tf_decltype down only for
268         CALL_EXPR and the RHS of COMPOUND_EXPR.
269         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
271         * cp-tree.h (abstract_class_use): New enum.
272         * typeck2.c (pending_abstract_type): Add use field.
273         (abstract_virtuals_error_sfinae): Add overloads taking
274         abstract_class_use instead of tree.
275         * typeck.c (build_static_cast_1): Call it.
276         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
277         * pt.c: Adjust calls.
278         * decl.c (cp_finish_decl): Don't handle functions specially.
279         (grokdeclarator): Always check return type.
280         * init.c (build_new_1): Adjust call.
282         DR 337
283         PR c++/17232
284         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
285         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
287         DR 657
288         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
289         (tsubst_arg_types): Likewise.
291         DR 1518
292         PR c++/54835
293         * call.c (convert_like_real): Check for explicit constructors
294         even for value-initialization.
296         PR c++/54946
297         * pt.c (convert_nontype_argument): Handle invalid pointer.
299         * parser.c (cp_parser_lambda_expression): Use nreverse.
301         PR c++/56447
302         PR c++/55532
303         * pt.c (instantiate_class_template_1): Instantiate lambda capture
304         list here.
305         (tsubst_copy_and_build): Not here.
307         PR c++/55017
308         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
310         PR c++/55240
311         * parser.c (parsing_nsdmi): New.
312         * semantics.c (outer_automatic_var_p): Check it.
313         (finish_id_expression): Likewise.
314         * cp-tree.h: Declare it.
316         PR c++/55241
317         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
319         * parser.c (lookup_literal_operator): Correct parm/arg naming
320         mixup.
322         PR c++/56238
323         * pt.c (fold_non_dependent_expr_sfinae): Check
324         instantiation_dependent_expression_p.
326         PR c++/56095
327         * class.c (resolve_address_of_overloaded_function): Accept a
328         reference to function for target_type.
329         (instantiate_type): Likewise.
330         * pt.c (convert_nontype_argument): Pass it to
331         convert_nontype_argument_function.
333 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
335         * tree.c (cp_tree_equal): Fix a pasto.
337         PR c++/56607
338         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
339         pass op1 through maybe_constant_value first.
341 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
343         PR c++/56582
344         * semantics.c (cxx_eval_array_reference): Check for negative index.
346 2013-03-14  Jason Merrill  <jason@redhat.com>
348         PR c++/56614
349         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
351         PR c++/56346
352         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
353         dso_handle parm on targets without __cxa_atexit.
355 2013-03-11  Jason Merrill  <jason@redhat.com>
357         PR c++/56567
358         * typeck.c (check_return_expr): Disallow returning init list here.
359         * semantics.c (apply_deduced_return_type): Not here.
361 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
363         PR c++/51412
364         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
365         * error.c (dump_expr): Likewise.
367 2013-03-08  Jason Merrill  <jason@redhat.com>
369         PR c++/51884
370         * class.c (modify_all_vtables): Mangle the vtable name before
371         entering dfs_walk.
373         * semantics.c (lambda_expr_this_capture): In unevaluated context,
374         just return the nearest 'this'.
376         PR c++/51494
377         PR c++/52183
378         PR c++/56222
379         * tree.c (maybe_dummy_object): Don't capture 'this'.
380         * semantics.c (maybe_resolve_dummy): New.
381         (finish_non_static_data_member): Use it.
382         (finish_qualified_id_expr): Don't test is_dummy_object.
383         * cp-tree.h: Declare maybe_resolve_dummy.
384         * call.c (build_new_method_call_1): Use it.
386         PR c++/56567
387         * semantics.c (apply_deduced_return_type): Don't allow returning
388         std::initializer_list.
390 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
392         PR c++/56534
393         * parser.c (cp_parser_elaborated_type_specifier): Don't call
394         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
395         * decl.c (check_elaborated_type_specifier): Tidy.
397 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
399         PR c++/56543
400         * tree.c (strip_typedefs): Don't copy args if they are NULL.
402 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
404         * parser.c (cp_parser_braced_list): For {} initialize
405         *non_constant_p to false.
407 2013-03-04  Jason Merrill  <jason@redhat.com>
409         PR c++/56464
410         PR c++/54383
411         * semantics.c (lambda_expr_this_capture): Handle NSDMI
412         and non-class scopes.
414 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
416         * decl.c (grokdeclarator): Remove dead code.
418 2013-02-28  Jason Merrill  <jason@redhat.com>
420         PR c++/56481
421         * semantics.c (potential_constant_expression_1): Use
422         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
424         PR c++/56243
425         * call.c (build_over_call): Avoid virtual lookup in a template.
427 2013-02-27  Jason Merrill  <jason@redhat.com>
429         PR c++/56358
430         PR c++/56323
431         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
432         of the base name for inheriting ctors.
433         (push_class_level_binding_1): Remove inheriting ctor handling.
434         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
435         * class.c (add_implicitly_declared_members): Adjust.
437 2013-02-26  David Binderman  <dcb314@hotmail.com>
439         PR c++/55632
440         * decl.c (grokdeclarator): Tidy publicp assignment.
442 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
444         PR c++/56419
445         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
446         (build_transaction_expr): Same.
448 2013-02-25  Jason Merrill  <jason@redhat.com>
450         PR c++/56377
451         * pt.c (fn_type_unification): Wait to call push_tinst_level until
452         we know what args we're looking at.
454         PR c++/56438
455         * semantics.c (potential_constant_expression_1): In C++98, a cast
456         to non-integral type can't be a constant expression.
458 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
460         PR c++/56403
461         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
462         of CLASS_TYPE_P.
464 2013-02-22  Jason Merrill  <jason@redhat.com>
466         PR c++/40405
467         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
468         if we got the wrong number of template parms.
470         PR c++/56377
471         * pt.c (fn_type_unification): Use explicit args in template
472         instantiation context.
474         PR c++/56359
475         * call.c (can_convert_arg): Discard access checks.
477         PR c++/56395
478         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
479         args.
481 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
483         PR c++/56373
484         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
485         * cvt.c (ocp_convert): Use the latter.
486         (cp_convert_to_pointer): Likewise.
487         * decl.c (check_default_argument): Likewise.
488         * typeck.c (cp_build_binary_op): Likewise.
489         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
491 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
492             Paolo Carlini  <paolo.carlini@oracle.com>
494         PR c++/51242
495         * decl2.c (grokbitfield): Allow scoped enumeration types.
497 2013-02-15  Jason Merrill  <jason@redhat.com>
499         PR c++/54276
500         * semantics.c (finish_id_expression): Also return the identifier
501         for an outer local static.
503         PR c++/56343
504         * class.c (check_bases_and_members): Deduce noexcept after
505         checking bases.
507         PR c++/52026
508         * semantics.c (finish_id_expression): In a template, return
509         the identifier for a constant variable.
511 2013-02-14  Jason Merrill  <jason@redhat.com>
513         PR c++/54922
514         * semantics.c (build_anon_member_initialization): New.
515         (build_data_member_initialization): Use it.
517         PR c++/55003
518         * decl.c (cp_finish_decl): Force instantiation of an
519         auto static data member.
521         PR c++/55220
522         * pt.c (unify): A pack expansion that is not the last template
523         argument makes the entire template argument list non-deduced.
525         PR c++/56323
526         * name-lookup.c (do_class_using_decl): Handle typedefs with
527         inheriting constructors.
528         (push_class_level_binding_1): Allow inheriting from template
529         template parameter, too.
530         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
532         PR c++/55223
533         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
534         default argument scope.
535         * mangle.c (write_name): Likewise.
537         PR c++/55232
538         * error.c (find_typenames_r): Don't walk into a pack expansion.
540 2013-02-13  Jason Merrill  <jason@redhat.com>
542         PR c++/55670
543         * parser.c (cp_parser_member_declaration): Check the declarator
544         form when detecting a function declaration via typedef.
546         PR c++/55680
547         * pt.c (maybe_process_partial_specialization): A lambda
548         isn't what's being specialized.
550         PR c++/55710
551         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
552         TREE_USED.
554         PR c++/55879
555         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
557         PR c++/55993
558         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
559         non-zero offsets, too.
561         PR c++/56155
562         * decl.c (build_enumerator): Always convert the value to a
563         fixed underlying type.
565         PR c++/56135
566         * pt.c (tsubst_copy_and_build): Don't forget any new
567         captures that arose from use of dependent names.
569 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
571         PR c++/56302
572         * semantics.c (finish_asm_stmt): If input constraints allow
573         neither register nor memory, try maybe_constant_value to get
574         a constant if possible.
576 2013-02-12  Jason Merrill  <jason@redhat.com>
578         PR c++/56285
579         * method.c (add_one_base_init): Handle base constructor
580         taking rvalue reference parm.
582         PR c++/56291
583         * semantics.c (sort_constexpr_mem_initializers): Handle
584         vptr out of order.
586 2013-02-09  Jason Merrill  <jason@redhat.com>
588         PR c++/56268
589         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
590         maybe_instantiate_noexcept.
592         PR c++/56247
593         * pt.c (eq_specializations): Set comparing_specializations.
594         * tree.c (cp_tree_equal): Check it.
595         * cp-tree.h: Declare it.
597         * decl.c (decls_match): Check versions later.
599         PR c++/56238
600         * pt.c (build_non_dependent_expr): Don't try to fold
601         instantiation-dependent expressions.
602         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
603         [BIND_EXPR]: Treat as dependent.
605 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
607         PR c++/56241
608         * init.c (build_vec_init): Don't append NULL values into new_vec.
609         (build_zero_init_1): Don't push anything into v if recursive call
610         returned NULL_TREE.
611         (build_value_init_noctor): Don't push anything into v if
612         build_value_init call returned NULL_TREE.
614         PR c++/56239
615         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
616         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
617         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
618         return true only if 2nd token isn't CPP_CLOSE_PAREN.
619         (cp_parser_cast_expression): Adjust caller.
621         PR c++/56237
622         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
623         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
624         DECL_LANG_SPECIFIC (t).
626 2013-02-07  Jason Merrill  <jason@redhat.com>
628         PR c++/56235
629         * method.c (do_build_copy_constructor): Don't bother turning
630         scalars from lvalues to xvalues.
631         (do_build_copy_assign): Likewise.
633 2013-02-06  Jason Merrill  <jason@redhat.com>
635         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
637 2013-02-05  Jason Merrill  <jason@redhat.com>
639         PR c++/54122
640         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
641         METHOD_TYPE.
643         PR c++/56177
644         * decl.c (start_preparsed_function): Update restype if we change
645         decl1.
647         PR c++/56208
648         * pt.c (fn_type_unification): Discard any access checks from
649         substituting explicit args.
651 2013-01-31  Jason Merrill  <jason@redhat.com>
653         PR c++/56162
654         PR c++/56104
655         * typeck.c (get_member_function_from_ptrfunc): Fix
656         ptrmemfunc_vbit_in_delta case.
658 2013-01-29  Jason Merrill  <jason@redhat.com>
660         PR libstdc++/54314
661         * class.c (build_ctor_vtbl_group): Give construction vtables
662         hidden visibility.
664 2013-01-25  Jason Merrill  <jason@redhat.com>
666         PR c++/56095
667         * pt.c (convert_nontype_argument_function): Handle invalid input.
668         (convert_nontype_argument): Likewise.
670         PR c++/56104
671         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
672         dynamic type has no virtual functions.
674 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
676         PR c++/55944
677         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
678         on TARGET_EXPR nodes.
680 2013-01-22  Jason Merrill  <jason@redhat.com>
682         PR c++/56071
683         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
685 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
687         PR c++/53609
688         * pt.c (argument_pack_element_is_expansion_p)
689         (make_argument_pack_select, use_pack_expansion_extra_args_p)
690         (gen_elem_of_pack_expansion_instantiation): New static functions.
691         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
692         look through the possibly resulting pack expansion as well.
693         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
694         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
695         Use gen_elem_of_pack_expansion_instantiation to build the
696         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
697         as gen_elem_of_pack_expansion_instantiation and the change in
698         tsubst above generalize this particular case.
699         (arg_from_parm_pack_p): Remove this for it's not used by
700         tsubst_pack_expansion anymore.
702 2013-01-21  Jason Merrill  <jason@redhat.com>
704         PR c++/56059
705         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
706         template args count.
708 2013-01-18  Jason Merrill  <jason@redhat.com>
710         PR target/54908
711         * decl2.c (get_local_tls_init_fn): New.
712         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
713         with aliases for internal variables.  Don't use weakrefs if
714         the variable needs destruction.
715         (generate_tls_wrapper): Mark the wrapper as const if no
716         initialization is needed.
717         (handle_tls_init): Don't require aliases.
719 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
721         PR c++/55663
722         * pt.c (coerce_innermost_template_parms): New static function.
723         (instantiate_alias_template):  Use it here.
725 2013-01-09  Jason Merrill  <jason@redhat.com>
727         PR c++/55878
728         * rtti.c (build_typeid, get_typeid): Add complain parm.
729         (get_tinfo_decl_dynamic): Likewise.
730         * cp-tree.h, parser.c, pt.c: Adjust.
732         PR c++/55893
733         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
734         needs destruction.
736 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
738         PR c/48418
739         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
740         call maybe_constant_value for the negative or too big shift
741         count warnings.
743 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
745         PR c++/55801
746         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
747         of the argument is true.
749 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
751         * parser.c (cp_parser_initializer_list): Move declaration
752         of variable non_const to start of lexical block.
754 2013-01-07  Jason Merrill  <jason@redhat.com>
756         PR c++/55753
757         * tree.c (build_aggr_init_expr): Do nothing in a template.
758         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
759         a FUNCTION_DECL before tsubsting.
761 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
763         PR c++/52343
764         * pt.c (check_instantiated_arg): Allow type template arguments.
766 2013-01-04  Jason Merrill  <jason@redhat.com>
768         PR c++/55877
769         * decl.c (reset_type_linkage, bt_reset_linkage): New.
770         (grokdeclarator): Use reset_type_linkage.
771         * name-lookup.c (binding_table_foreach): Handle null table.
772         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
774 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
776         PR c++/54526 (again)
777         * parser.c (cp_parser_template_id): Revert core of previous change
778         (keep adjusted inform message).
780 2013-01-03  Jason Merrill  <jason@redhat.com>
782         PR c++/55419
783         PR c++/55753
784         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
785         TREE_CONSTANT.
787         PR c++/55842
788         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
790         PR c++/55856
791         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
793         PR c++/53650
794         * call.c (type_has_extended_temps): New.
795         * cp-tree.h: Declare it.
796         * decl.c (check_initializer): Use build_aggr_init for arrays
797         if it is false.
798         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
800 2013-01-02  Jason Merrill  <jason@redhat.com>
802         PR c++/54325
803         * call.c (build_new_method_call_1): Don't use build_value_init for
804         user-provided default constructors.
806         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
808         PR c++/55032
809         PR c++/55245
810         * tree.c (build_cplus_array_type): Copy layout information
811         to main variant if necessary.
813 Copyright (C) 2013 Free Software Foundation, Inc.
815 Copying and distribution of this file, with or without modification,
816 are permitted in any medium without royalty provided the copyright
817 notice and this notice are preserved.