fix changelog
[official-gcc.git] / gcc / cp / ChangeLog
blob8ebc904ca10391a347e7d331190cee00bc588e02
1 2013-04-11  Jason Merrill  <jason@redhat.com>
3         PR c++/52748
4         * parser.c (complain_flags): New.
5         (cp_parser_postfix_expression): Use it.
6         (cp_parser_unary_expression): Likewise.
7         (cp_parser_binary_expression): Likewise.
8         (cp_parser_assignment_expression): Likewise.
9         (cp_parser_expression): Likewise.
10         (cp_parser_postfix_open_square_expression): Take decltype_p.
11         (cp_parser_builtin_offsetof): Adjust.
12         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
13         * decl2.c (grok_array_decl): Add decltype_p parm.
14         * cp-tree.h: Adjust prototype.
15         * semantics.c (finish_unary_op_expr): Add complain parm.
17 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
19         PR c++/56895
20         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
21         calling maybe_constant_value for C++98.
23 2013-04-11  Jason Merrill  <jason@redhat.com>
25         PR c++/56901
26         * semantics.c (lambda_capture_field_type, lambda_proxy_type):
27         Strip references before checking WILDCARD_TYPE_P.
29 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
31         * call.c (build_conditional_expr_1, build_over_call): Protect
32         error calls with complain & tf_error.
33         * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
34         build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
35         build_ptrmemfunc): Likewise.
36         (lookup_destructor): Take tsubst_flags_t parameter, adjust.
38         * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
39         (convert_to_reference): Adjust.
41 2013-04-11  Jason Merrill  <jason@redhat.com>
43         * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
44         local variables, look them up instead.
45         (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
46         proxies and substitution in unevaluated context.
47         (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
48         before the iterators.
50         PR c++/23055
51         * pt.c (uses_deducible_template_parms): New.
52         (deducible_array_bound, deducible_expression): New.
53         (deducible_template_args): New.
54         (unify_one_argument): Call uses_deducible_template_parms.
56 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
58         PR c++/56913
59         * typeck2.c (build_m_component_ref): Protect error calls with
60         (complain & tf_error).
62 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
64         PR c++/54216
65         * parser.c (cp_parser_enum_specifier): Check for empty
66         anonymous enums and anonymous scoped enums.
68 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
70         PR c++/56895
71         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
72         first before calling maybe_constant_value for warn_for_div_by_zero
73         or invalid shift count warning purposes.
75 2013-04-09  Jason Merrill  <jason@redhat.com>
77         PR c++/25466
78         * rtti.c (build_typeid): Check the address of the argument
79         rather than looking for an INDIRECT_REF.
81 2013-04-04  Jason Merrill  <jason@redhat.com>
83         PR c++/56838
84         PR c++/17232
85         * typeck2.c (abstract_virtuals_error_sfinae): Disable
86         complete_type again.
88 2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
90         PR c++/56871
91         * decl.c (validate_constexpr_redeclaration): Allow an explicit
92         specialization to be different wrt the constexpr specifier.
94 2013-04-06  Jason Merrill  <jason@redhat.com>
96         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
97         noreturn attribute.
99 2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>
101         * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
102         cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.
104 2013-04-03  Jason Merrill  <jason@redhat.com>
106         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
107         (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
108         (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
110         * mangle.c (write_type): When writing a function type with
111         function-cv-quals, don't add the unqualified type as a
112         substitution candidate.
114 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
116         PR c++/56815
117         * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
118         pedwarn.
120 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
122         PR debug/56819
123         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
124         from args to new_args.
125         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
126         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
128 2013-04-02  Jason Merrill  <jason@redhat.com>
130         PR c++/56821
131         * mangle.c (write_function_type): Mangle ref-qualifier.
132         (write_nested_name): Likewise.
133         (canonicalize_for_substitution): Preserve ref-qualifier.
134         (write_type): Likewise.
136         PR c++/34949
137         * decl.c (begin_destructor_body): Clobber the object in a cleanup.
139 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
141         * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
142         * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
143         (for_each_template_parm_r): Use TYPE_TI_ARGS.
145 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
147         * cp-tree.h (TAGGED_TYPE_P): Remove.
148         (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
149         (TYPE_ANONYMOUS_P): Adjust.
150         * call.c (build_new_op_1): Likewise.
151         * class.c (find_abi_tags_r): Likewise.
152         * decl.c (warn_misplaced_attr_for_class_type, start_decl,
153         type_is_deprecated): Likewise.
154         * decl2.c (grokfield, min_vis_r): Likewise.
155         * pt.c (get_template_info): Likewise.
156         * tree.c (handle_abi_tag_attribute): Likewise.
158 2013-04-01  Jason Merrill  <jason@redhat.com>
160         * semantics.c (maybe_constant_value): Check
161         instantiation_dependent_expression_p.
162         * pt.c (build_non_dependent_expr): Don't check it here.
164         PR c++/56772
165         * init.c (build_new): Don't try to process an array initializer
166         at template definition time.
168         PR c++/56793
169         * typeck.c (finish_class_member_access_expr): Handle enum scope.
171         PR c++/56794
172         * parser.c (cp_parser_range_for): Don't try to do auto deduction
173         in a template if the type of the range is incomplete.
175         * call.c (add_function_candidate): Take the address of 'this' here.
176         (build_over_call): And here.
177         (build_new_method_call_1, build_op_call_1): Not here.
178         (build_user_type_conversion_1): Or here.
179         (add_candidates): Adjust.
181         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
182         * class.c (same_signature_p): Use type_memfn_quals.
183         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
184         FUNCTION_OR_METHOD_TYPE_CHECK.
185         * error.c (dump_type_suffix): Add padding before cv-qualifiers.
186         * pt.c (unify): Use static_fn_type.
188 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
189             Jason Merrill  <jason@redhat.com>
191         Implement N2439 (ref-qualifiers for 'this')
192         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
193         (FUNCTION_RVALUE_QUALIFIED): New.
194         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
195         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
196         (cp_ref_qualifier): New enum.
197         (cp_declarator): Add ref_qualifier.
198         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
199         (cp_parser_direct_declarator): Use it.
200         (make_call_declarator): Adjust.
201         (cp_parser_lambda_declarator_opt): Adjust.
202         * call.c (add_function_candidate): Handle ref-qualifier overload
203         resolution semantics.
204         (standard_conversion): Adjust.
205         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
206         * decl.c (grokdeclarator): Handle ref-qualifiers.
207         (grokfndecl): Check for invalid ref-qualifiers.
208         (static_fn_type, revert_static_member_fn): Adjust.
209         * decl2.c (build_memfn_type): Handle ref-qualifiers.
210         (check_classfn): Check them.
211         (cp_reconstruct_complex_type): Retain them.
212         * error.c (dump_ref_qualifier): New.
213         (dump_type_suffix, dump_function_decl): Use it.
214         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
215         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
216         (unify): Retain them.
217         * tree.c (cp_check_qualified_type): New.
218         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
219         (build_ref_qualified_type): New.
220         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
221         (cp_build_type_attribute_variant): Keep ref-qualifier.
222         * typeck.c (merge_types): Keep ref-qualifier.
223         (structural_comptypes): Compare ref-qualifier.
224         (type_memfn_rqual): New.
225         (apply_memfn_quals): Take ref-qual argument.
226         * typeck2.c (build_m_component_ref): Check ref-qualifier.
228 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
230         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
231         (DECL_FUNCTION_TEMPLATE_P): Adjust.
233         * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
234         pp_cxx_qualified_id): Use get_containing_scope.
235         * parser.c (cp_parser_class_head): Likewise.
236         * pt.c (push_template_decl_real): Likewise.
238         * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
239         * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
241 2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>
243         * decl2.c (collect_candidates_for_java_method_aliases): Use
244         DECL_CLASS_SCOPE_P.
245         * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
246         (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
247         * decl.c (duplicate_decls): Likewise.
248         * parser.c (cp_parser_template_declaration_after_export): Likewise,
249         also DECL_DECLARES_TYPE_P.
250         * pt.c (instantiate_class_template_1): Likewise.
251         * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
252         (lookup_field_r): Likewise.
253         (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
254         (lookup_fnfields_slot_nolazy): Likewise.
255         * semantics.c (finish_member_declaration): Likewise.
256         * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
258 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
260         * pt.c (template_parms_to_args): Fix typo in comment.
262 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
264         * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
266 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
268         * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
269         (build_op_call_1): Likewise.
270         (build_over_call): Likewise.
271         (compare_ics): Likewise.
272         * class.c (build_base_path): Likewise.
273         (resolve_address_of_overloaded_function): Likewise.
274         * cp-tree.h: Likewise.
275         * cvt.c (cp_convert_to_pointer): Likewise.
276         (convert_to_reference): Likewise.
277         (ocp_convert): Likewise.
278         (convert_force): Likewise, tidy.
279         * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
280         (pp_cxx_ptr_operator): Likewise.
281         * decl.c (duplicate_decls): Likewise.
282         (start_decl): Likewise.
283         (grok_op_properties): Likewise.
284         (start_preparsed_function): Likewise.
285         (store_parm_decls): Likewise.
286         (finish_function): Likewise.
287         * decl2.c (delete_sanity): Likewise.
288         (acceptable_java_type): Likewise.
289         (grokbitfield): Likewise.
290         (cp_reconstruct_complex_type): Likewise.
291         * error.c (dump_type_prefix): Likewise.
292         (dump_expr): Likewise.
293         * except.c (push_eh_cleanup): Likewise.
294         (complete_ptr_ref_or_void_ptr_p): Likewise.
295         (can_convert_eh): Likewise.
296         * init.c (build_new_1): Likewise.
297         (build_delete): Likewise.
298         (build_vec_delete): Likewise.
299         * mangle.c (write_type): Likewise.
300         * parser.c (lookup_literal_operator): Likewise.
301         * pt.c (convert_nontype_argument_function): Likewise.
302         (convert_nontype_argument): Likewise.
303         (tsubst): Likewise.
304         (unify): Likewise.
305         (dependent_type_p_r): Likewise.
306         * rtti.c (build_headof): Likewise.
307         (build_typeid): Likewise.
308         (build_dynamic_cast_1): Likewise.
309         (target_incomplete_p): Likewise.
310         (typeinfo_in_lib_p): Likewise.
311         * semantics.c (finish_omp_for): Likewise.
312         (cxx_eval_call_expression): Likewise.
313         (maybe_resolve_dummy): Likewise.
314         * tree.c (build_target_expr): Likewise.
315         (cp_build_qualified_type_real): Likewise.
316         * typeck.c (composite_pointer_type_r): Likewise.
317         (composite_pointer_type): Likewise.
318         (comp_except_types): Likewise.
319         (cxx_sizeof_nowarn): Likewise.
320         (string_conv_p): Likewise.
321         (cp_build_array_ref): Likewise.
322         (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
323         (pointer_diff): Likewise.
324         (cp_build_addr_expr_1): Likewise.
325         (cp_build_unary_op): Likewise.
326         (build_static_cast_1): Likewise.
327         (cp_build_c_cast): Likewise.
328         (comp_ptr_ttypes_real): Likewise.
329         (ptr_reasonably_similar): Likewise.
330         (comp_ptr_ttypes_const): Likewise.
331         (casts_away_constness): Likewise.
332         (check_literal_operator_args): Likewise.
333         * typeck2.c (build_x_arrow): Likewise.
334         (add_exception_specifier): Likewise.
336 2013-03-29  Jason Merrill  <jason@redhat.com>
338         N3582
339         * cp-tree.h (AUTO_IS_DECLTYPE): New.
340         * parser.c (cp_parser_decltype): Handle decltype(auto).
341         (cp_parser_type_id_1): Allow auto without a late-specified
342         return in C++1y.
343         (cp_parser_primary_expression): Use the return value of
344         finish_parenthesized_expr.
345         (cp_parser_transaction_expression): Likewise.
346         * semantics.c (force_paren_expr): New.
347         (finish_parenthesized_expr): Use it.
348         * call.c (build_conditional_expr_1): Likewise.
349         * pt.c (do_auto_deduction): Handle decltype(auto).
350         (tsubst_copy): Handle PAREN_EXPR.
351         (tsubst_copy_and_build): Likewise.
352         * error.c (dump_expr): Handle PAREN_EXPR.
353         * cxx-pretty-print.c (pp_cxx_expression): Likewise.
354         * mangle.c (write_expression): Ignore PAREN_EXPR.
356         * parser.c (cp_parser_decltype_expr): Split out...
357         (cp_parser_decltype): ...from here.
359         PR c++/56774
360         PR c++/35722
361         * pt.c (unify_pack_expansion): Fix indexing.
363 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
365         * call.c (build_java_interface_fn_ref): Likewise.
366         (make_temporary_var_for_ref_to_temp): Likewise.
367         * class.c (check_field_decls): Likewise.
368         (layout_class_type): Likewise.
369         (finish_struct_1): Likewise.
370         (fixed_type_or_null): Likewise.
371         (get_vtbl_decl_for_binfo): Likewise.
372         * cp-gimplify.c (omp_var_to_track): Likewise.
373         (cp_genericize_r): Likewise.
374         * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
375         * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
376         (DECL_DISCRIMINATOR_P): Likewise.
377         * decl.c (poplevel): Likewise.
378         (decls_match): Likewise.
379         (duplicate_decls): Likewise.
380         (decl_jump_unsafe): Likewise.
381         (start_decl): Likewise.
382         (check_for_uninitialized_const_var): Likewise.
383         (make_rtl_for_nonlocal_decl): Likewise.
384         (cp_finish_decl): Likewise.
385         (expand_static_init): Likewise.
386         (local_variable_p): Likewise.
387         (maybe_register_incomplete_var): Likewise.
388         * decl2.c (grokfield): Likewise.
389         (comdat_linkage): Likewise.
390         (determine_visibility): Likewise.
391         (import_export_decl): Likewise.
392         (prune_vars_needing_no_initialization): Likewise.
393         (decl_maybe_constant_var_p): Likewise.
394         * error.c (dump_simple_decl): Likewise.
395         (dump_template_decl): Likewise.
396         (cp_printer): Likewise.
397         * except.c (build_throw): Likewise.
398         * init.c (build_vtbl_address): Likewise.
399         (member_init_ok_or_else): Likewise.
400         (build_aggr_init): Likewise.
401         (expand_aggr_init_1): Likewise.
402         (build_offset_ref): Likewise.
403         (constant_value_1): Likewise.
404         * mangle.c (write_mangled_name): Likewise.
405         (write_prefix): Likewise.
406         * name-lookup.c (supplement_binding_1): Likewise.
407         (add_decl_to_level): Likewise.
408         (pushdecl_maybe_friend_1): Likewise.
409         (check_for_out_of_scope_variable): Likewise.
410         (validate_nonmember_using_decl): Likewise.
411         (lookup_name_innermost_nonclass_level_1): Likewise.
412         (lookup_arg_dependent_1): Likewise.
413         * parser.c (cp_parser_lambda_introducer): Likewise.
414         (cp_parser_template_argument): Likewise.
415         (cp_parser_single_declaration): Likewise.
416         * pt.c (convert_nontype_argument): Likewise.
417         (instantiate_class_template_1): Likewise.
418         (tsubst_decl): Likewise.
419         (tsubst_expr): Likewise.
420         (do_decl_instantiation): Likewise.
421         (do_type_instantiation): Likewise.
422         (regenerate_decl_from_template): Likewise.
423         (always_instantiate_p): Likewise.
424         (instantiate_decl): Likewise.
425         (type_dependent_expression_p): Likewise.
426         (build_non_dependent_expr): Likewise.
427         * repo.c (repo_emit_p): Likewise.
428         * rtti.c (build_dynamic_cast_1): Likewise.
429         * search.c (shared_member_p): Likewise.
430         * semantics.c (outer_var_p): Likewise.
431         (finish_id_expression): Likewise.
432         (finish_omp_clauses): Likewise.
433         (finish_decltype_type): Likewise.
434         (ensure_literal_type_for_constexpr_object): Likewise.
435         * tree.c (lvalue_kind): Likewise.
436         (bot_replace): Likewise.
437         (cp_tree_equal): Likewise.
438         (handle_init_priority_attribute): Likewise.
439         (decl_storage_duration): Likewise.
440         * typeck.c (cxx_sizeof_expr): Likewise.
441         (cxx_alignof_expr): Likewise.
442         (decay_conversion): Likewise.
443         (build_class_member_access_expr): Likewise.
444         (cp_build_array_ref): Likewise.
445         (cxx_mark_addressable): Likewise.
446         (maybe_warn_about_returning_address_of_local): Likewise.
447         (check_return_expr): Likewise.
448         * typeck2.c (cxx_readonly_error): Likewise.
449         (abstract_virtuals_error_sfinae): Likewise.
450         (cxx_incomplete_type_diagnostic): Likewise.
452 2013-03-28  Lawrence Crowl  <crowl@google.com>
454         * Make-lang.in
455         (CXX_PARSER_H): Add header dependence.
456         * cp-tree.h
457         (extern debug (cp_binding_level &)): New.
458         (extern debug (cp_binding_level *)): New.
459         * name-lookup.h
460         (debug (cp_binding_level &)): New.
461         (debug (cp_binding_level *)): New.
462         * parser.c
463         (debug (cp_parser &)): New.
464         (debug (cp_parser *)): New.
465         (debug (cp_token &)): New.
466         (debug (cp_token *)): New.
467         (debug (vec<cp_token, va_gc> &)): New.
468         (debug (vec<cp_token, va_gc> *)): New.
469         * parser.c: Add header dependence.
470         (extern debug (cp_parser &)): New.
471         (extern debug (cp_parser *)): New.
472         (extern debug (cp_token &)): New.
473         (extern debug (cp_token *)): New.
474         (extern debug (vec<cp_token, va_gc> &)): New.
475         (extern debug (vec<cp_token, va_gc> *)): New.
477 2013-03-28  Jason Merrill  <jason@redhat.com>
479         PR c++/17232
480         PR c++/52748
481         * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
482         the type if tf_decltype is set.
483         * pt.c (fn_type_unification): Add decltype_p parm.
484         (get_bindings): Adjust.
485         * cp-tree.h: Adjust.
486         * class.c (resolve_address_of_overloaded_function): Adjust.
487         * call.c (add_template_candidate_real, print_z_candidate): Adjust.
489         PR c++/56679
490         * parser.c (cp_parser_sizeof_pack): Split out from...
491         (cp_parser_sizeof_operand): ...here.  Require (id).
493         PR c++/56701
494         * semantics.c (finish_this_expr): 'this' is an rvalue.
495         * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
497         PR c++/56710
498         * semantics.c (finish_member_declaration): Don't push closure
499         members.
501         * name-lookup.c (pushdecl_maybe_friend_1): Use
502         nonlambda_method_basetype and current_nonlambda_class_type.
504         PR c++/56728
505         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
506         conversion from integer to pointer.
507         (cxx_eval_constant_expression): Likewise.
508         (cxx_eval_indirect_ref): Use the folded operand if we still think
509         this might be constant.
511 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
512             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
514         PR c++/56725
515         * call.c (convert_like_real): Change series of two permerrors
516         to permerror + inform (and likewise for two errors).
517         (build_new_method_call_1): Likewise.
518         * typeck.c (convert_for_initialization): Change additional
519         warning or error to inform.
521 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
523         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
524         (first_aggr_init_expr): Likewise.
525         (more_aggr_init_expr_args_p): Likewise.
526         (type_of_this_parm): Likewise.
527         (class_of_this_parm): Likewise.
528         * name-lookup.h (get_global_value_if_present): Likewise.
529         (is_typename_at_global_scope): Likewise.
531 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
533         * call.c (joust): Don't call inform for a permerror returning false.
534         * parser.c (cp_parser_check_class_key): Likewise.
535         * pt.c (tsubst_copy_and_build): Likewise.
537 2013-03-27  Jason Merrill  <jason@redhat.com>
539         PR c++/56749
540         * semantics.c (finish_qualified_id_expr): Return early
541         for enum scope.
543 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
545         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
546         * cvt.c (convert_to_void): Likewise.
547         * error.c (dump_expr): Likewise.
548         * mangle.c (write_expression): Likewise.
549         * parser.c (cp_parser_template_argument): Likewise.
550         * pt.c (convert_nontype_argument): Likewise.
551         (tsubst_copy_and_build): Likewise.
552         * rtti.c (build_typeid): Likewise.
553         * semantics.c (finish_call_expr): Likewise.
554         (finish_decltype_type): Likewise.
555         (build_data_member_initialization): Likewise.
556         * tree.c (is_dummy_object): Likewise.
557         * typeck.c (decay_conversion): Likewise.
558         (build_class_member_access_expr): Likewise.
559         (cp_build_addr_expr_1): Likewise.
560         (unary_complex_lvalue): Likewise.
561         (check_return_expr): Likewise.
562         * typeck2.c (cxx_readonly_error): Likewise.
564 2013-03-26  Jason Merrill  <jason@redhat.com>
566         PR c++/52597
567         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
568         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
569         * cp-tree.h: Adjust prototype.
571         PR c++/45282
572         * typeck2.c (build_m_component_ref): Handle prvalue object.
574 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
576         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
577         * decl.c (duplicate_decls): Likewise.
578         (cp_finish_decl): Likewise.
579         (check_class_member_definition_namespace): Likewise.
580         * decl2.c (grokfield): Likewise.
581         (decl_needed_p): Likewise.
582         (import_export_decl): Likewise.
583         (mark_used): Likewise.
584         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
585         * pt.c (push_access_scope): Likewise.
586         (instantiate_decl): Likewise.
587         * ptree.c (cxx_print_decl): Likewise.
588         * repo.c (repo_emit_p): Likewise.
589         * semantics.c (note_decl_for_pch): Likewise.
590         * tree.c (decl_linkage): Likewise.
592 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
594         PR c++/55951
595         * decl.c (check_array_designated_initializer): Handle CONST_DECL
596         as ce->index.
598 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
600         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
601         error messages.
603         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
605 2013-03-25  Jason Merrill  <jason@redhat.com>
607         PR c++/56699
608         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
609         class is derived from the type of the object.
611         PR c++/52014
612         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
613         unevaluated context.
615 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
617         PR c++/56722
618         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
619         DECL_TEMPLATE_INSTANTIATION.
621 2013-03-22  Jason Merrill  <jason@redhat.com>
623         PR c++/56684
624         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
625         and CONST_DECL.
627 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
629         * cp-tree.h (identifier_p): New.
630         * call.c: Throughout, call identifier_p insstead of direct
631         comparaison of TREE_CODE against IDENTIFIER_NODE.
632         * decl.c: Likewisse.
633         * decl2.c: Likewise.
634         * init.c: Likewise.
635         * mangle.c: Likewise.
636         * name-lookup.c: Likewise.
637         * parser.c: Likewise.
638         * pt.c: Likewise.
639         * search.c: Likewise.
640         * semantics.c: Likewise.
641         * tree.c: Likewise.
642         * typeck.c: Likewise.
643         * typeck2.c: Likewise.
645 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
647         PR middle-end/48087
648         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
649         * call.c (build_temp): Likewise.
650         * method.c (synthesize_method): Likewise.
651         * typeck.c (convert_for_initialization): Likewise.
653 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
655         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
657 2013-03-21  Richard Biener  <rguenther@suse.de>
659         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
660         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
662 2013-03-20  Jason Merrill  <jason@redhat.com>
664         PR c++/56646
665         * parser.c (cp_parser_late_return_type_opt): Save and restore
666         current_class_ptr/ref.
668         PR c++/54532
669         * expr.c (cplus_expand_constant): Do nothing if the class is
670         incomplete.
671         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
672         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
673         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
674         (complete_vars): Likewise.
676         * name-lookup.c (get_anonymous_namespace_name): Never use
677         get_file_function_name.
679         * pt.c (retrieve_specialization): Handle null tmpl argument.
681         PR c++/17232
682         PR c++/56642
683         * pt.c (tsubst_decl): Check return value of register_specialization.
684         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
685         change.
687 2013-03-17  Jason Merrill  <jason@redhat.com>
689         PR c++/54359
690         PR c++/56639
691         * parser.c (cp_parser_direct_declarator): Bail if we see a
692         qualified-id not at namespace scope.
694         PR c++/17232
695         PR c++/56642
696         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
697         change for now.
699 2013-03-16  Jason Merrill  <jason@redhat.com>
701         * decl.c (grokdeclarator): Assert that we won't see a pointer to
702         METHOD_TYPE.
704         PR c++/54277
705         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
706         (MAYBE_CLASS_TYPE_P): ...here.
707         * semantics.c (lambda_capture_field_type): Only build a
708         magic decltype for wildcard types.
709         (lambda_proxy_type): Likewise.
710         (finish_non_static_data_member): Get the quals from
711         the object.
713         PR c++/55931
714         * parser.c (cp_parser_template_argument): Don't
715         fold_non_dependent_expr.
717         * parser.c (cp_parser_lambda_declarator_opt): Use
718         cp_parser_trailing_type_id.
720         PR c++/45917
721         * parser.c (cp_parser_template_id): Don't forget access checks.
723         PR c++/52374
724         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
726         PR c++/54764
727         PR c++/55972
728         * name-lookup.h (tag_scope): Add ts_lambda.
729         * semantics.c (begin_lambda_type): Use it.
730         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
731         * pt.c (check_default_tmpl_args): Ignore lambdas.
732         (push_template_decl_real): Handle lambdas.
733         * tree.c (no_linkage_check): Adjust lambda check.
735         PR c++/56039
736         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
738         PR c++/54359
739         * parser.c (cp_parser_direct_declarator): Fix late return
740         for out-of-class defn of member function.
742         PR c++/55357
743         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
744         parms to avoid duplicate -Wshadow warnings.
746         * search.c (lookup_base): Handle NULL_TREE.
748         PR c++/56481
749         * semantics.c (potential_constant_expression_1): Use of 'this' in
750         a non-constexpr function makes the expression not potentially
751         constant.
753         N3276
754         PR c++/52748
755         * cp-tree.h (tsubst_flags): Add tf_decltype.
756         * call.c (build_cxx_call): Don't build a temporary if it's set.
757         (build_over_call): Make sure it's only passed to build_cxx_call.
758         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
759         (cp_parser_unary_expression): Likewise.
760         (cp_parser_cast_expression): Likewise.
761         (cp_parser_binary_expression): Likewise.
762         (cp_parser_assignment_expression): Likewise.
763         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
764         (cp_parser_expression): Add decltype_p.  Force a
765         temporary for a call on the LHS of a comma.
766         (cp_parser_decltype): Pass true to decltype_p parms.
767         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
768         (tsubst_copy_and_build): Pass tf_decltype down only for
769         CALL_EXPR and the RHS of COMPOUND_EXPR.
770         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
772         * cp-tree.h (abstract_class_use): New enum.
773         * typeck2.c (pending_abstract_type): Add use field.
774         (abstract_virtuals_error_sfinae): Add overloads taking
775         abstract_class_use instead of tree.
776         * typeck.c (build_static_cast_1): Call it.
777         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
778         * pt.c: Adjust calls.
779         * decl.c (cp_finish_decl): Don't handle functions specially.
780         (grokdeclarator): Always check return type.
781         * init.c (build_new_1): Adjust call.
783         DR 337
784         PR c++/17232
785         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
786         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
788         DR 657
789         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
790         (tsubst_arg_types): Likewise.
792         DR 1518
793         PR c++/54835
794         * call.c (convert_like_real): Check for explicit constructors
795         even for value-initialization.
797         PR c++/54946
798         * pt.c (convert_nontype_argument): Handle invalid pointer.
800         * parser.c (cp_parser_lambda_expression): Use nreverse.
802         PR c++/56447
803         PR c++/55532
804         * pt.c (instantiate_class_template_1): Instantiate lambda capture
805         list here.
806         (tsubst_copy_and_build): Not here.
808         PR c++/55017
809         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
811         PR c++/55240
812         * parser.c (parsing_nsdmi): New.
813         * semantics.c (outer_automatic_var_p): Check it.
814         (finish_id_expression): Likewise.
815         * cp-tree.h: Declare it.
817         PR c++/55241
818         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
820         * parser.c (lookup_literal_operator): Correct parm/arg naming
821         mixup.
823         PR c++/56238
824         * pt.c (fold_non_dependent_expr_sfinae): Check
825         instantiation_dependent_expression_p.
827         PR c++/56095
828         * class.c (resolve_address_of_overloaded_function): Accept a
829         reference to function for target_type.
830         (instantiate_type): Likewise.
831         * pt.c (convert_nontype_argument): Pass it to
832         convert_nontype_argument_function.
834 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
836         * tree.c (cp_tree_equal): Fix a pasto.
838         PR c++/56607
839         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
840         pass op1 through maybe_constant_value first.
842 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
844         PR c++/56582
845         * semantics.c (cxx_eval_array_reference): Check for negative index.
847 2013-03-14  Jason Merrill  <jason@redhat.com>
849         PR c++/56614
850         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
852         PR c++/56346
853         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
854         dso_handle parm on targets without __cxa_atexit.
856 2013-03-11  Jason Merrill  <jason@redhat.com>
858         PR c++/56567
859         * typeck.c (check_return_expr): Disallow returning init list here.
860         * semantics.c (apply_deduced_return_type): Not here.
862 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
864         PR c++/51412
865         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
866         * error.c (dump_expr): Likewise.
868 2013-03-08  Jason Merrill  <jason@redhat.com>
870         PR c++/51884
871         * class.c (modify_all_vtables): Mangle the vtable name before
872         entering dfs_walk.
874         * semantics.c (lambda_expr_this_capture): In unevaluated context,
875         just return the nearest 'this'.
877         PR c++/51494
878         PR c++/52183
879         PR c++/56222
880         * tree.c (maybe_dummy_object): Don't capture 'this'.
881         * semantics.c (maybe_resolve_dummy): New.
882         (finish_non_static_data_member): Use it.
883         (finish_qualified_id_expr): Don't test is_dummy_object.
884         * cp-tree.h: Declare maybe_resolve_dummy.
885         * call.c (build_new_method_call_1): Use it.
887         PR c++/56567
888         * semantics.c (apply_deduced_return_type): Don't allow returning
889         std::initializer_list.
891 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
893         PR c++/56534
894         * parser.c (cp_parser_elaborated_type_specifier): Don't call
895         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
896         * decl.c (check_elaborated_type_specifier): Tidy.
898 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
900         PR c++/56543
901         * tree.c (strip_typedefs): Don't copy args if they are NULL.
903 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
905         * parser.c (cp_parser_braced_list): For {} initialize
906         *non_constant_p to false.
908 2013-03-04  Jason Merrill  <jason@redhat.com>
910         PR c++/56464
911         PR c++/54383
912         * semantics.c (lambda_expr_this_capture): Handle NSDMI
913         and non-class scopes.
915 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
917         * decl.c (grokdeclarator): Remove dead code.
919 2013-02-28  Jason Merrill  <jason@redhat.com>
921         PR c++/56481
922         * semantics.c (potential_constant_expression_1): Use
923         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
925         PR c++/56243
926         * call.c (build_over_call): Avoid virtual lookup in a template.
928 2013-02-27  Jason Merrill  <jason@redhat.com>
930         PR c++/56358
931         PR c++/56323
932         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
933         of the base name for inheriting ctors.
934         (push_class_level_binding_1): Remove inheriting ctor handling.
935         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
936         * class.c (add_implicitly_declared_members): Adjust.
938 2013-02-26  David Binderman  <dcb314@hotmail.com>
940         PR c++/55632
941         * decl.c (grokdeclarator): Tidy publicp assignment.
943 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
945         PR c++/56419
946         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
947         (build_transaction_expr): Same.
949 2013-02-25  Jason Merrill  <jason@redhat.com>
951         PR c++/56377
952         * pt.c (fn_type_unification): Wait to call push_tinst_level until
953         we know what args we're looking at.
955         PR c++/56438
956         * semantics.c (potential_constant_expression_1): In C++98, a cast
957         to non-integral type can't be a constant expression.
959 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
961         PR c++/56403
962         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
963         of CLASS_TYPE_P.
965 2013-02-22  Jason Merrill  <jason@redhat.com>
967         PR c++/40405
968         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
969         if we got the wrong number of template parms.
971         PR c++/56377
972         * pt.c (fn_type_unification): Use explicit args in template
973         instantiation context.
975         PR c++/56359
976         * call.c (can_convert_arg): Discard access checks.
978         PR c++/56395
979         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
980         args.
982 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
984         PR c++/56373
985         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
986         * cvt.c (ocp_convert): Use the latter.
987         (cp_convert_to_pointer): Likewise.
988         * decl.c (check_default_argument): Likewise.
989         * typeck.c (cp_build_binary_op): Likewise.
990         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
992 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
993             Paolo Carlini  <paolo.carlini@oracle.com>
995         PR c++/51242
996         * decl2.c (grokbitfield): Allow scoped enumeration types.
998 2013-02-15  Jason Merrill  <jason@redhat.com>
1000         PR c++/54276
1001         * semantics.c (finish_id_expression): Also return the identifier
1002         for an outer local static.
1004         PR c++/56343
1005         * class.c (check_bases_and_members): Deduce noexcept after
1006         checking bases.
1008         PR c++/52026
1009         * semantics.c (finish_id_expression): In a template, return
1010         the identifier for a constant variable.
1012 2013-02-14  Jason Merrill  <jason@redhat.com>
1014         PR c++/54922
1015         * semantics.c (build_anon_member_initialization): New.
1016         (build_data_member_initialization): Use it.
1018         PR c++/55003
1019         * decl.c (cp_finish_decl): Force instantiation of an
1020         auto static data member.
1022         PR c++/55220
1023         * pt.c (unify): A pack expansion that is not the last template
1024         argument makes the entire template argument list non-deduced.
1026         PR c++/56323
1027         * name-lookup.c (do_class_using_decl): Handle typedefs with
1028         inheriting constructors.
1029         (push_class_level_binding_1): Allow inheriting from template
1030         template parameter, too.
1031         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
1033         PR c++/55223
1034         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
1035         default argument scope.
1036         * mangle.c (write_name): Likewise.
1038         PR c++/55232
1039         * error.c (find_typenames_r): Don't walk into a pack expansion.
1041 2013-02-13  Jason Merrill  <jason@redhat.com>
1043         PR c++/55670
1044         * parser.c (cp_parser_member_declaration): Check the declarator
1045         form when detecting a function declaration via typedef.
1047         PR c++/55680
1048         * pt.c (maybe_process_partial_specialization): A lambda
1049         isn't what's being specialized.
1051         PR c++/55710
1052         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
1053         TREE_USED.
1055         PR c++/55879
1056         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
1058         PR c++/55993
1059         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
1060         non-zero offsets, too.
1062         PR c++/56155
1063         * decl.c (build_enumerator): Always convert the value to a
1064         fixed underlying type.
1066         PR c++/56135
1067         * pt.c (tsubst_copy_and_build): Don't forget any new
1068         captures that arose from use of dependent names.
1070 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
1072         PR c++/56302
1073         * semantics.c (finish_asm_stmt): If input constraints allow
1074         neither register nor memory, try maybe_constant_value to get
1075         a constant if possible.
1077 2013-02-12  Jason Merrill  <jason@redhat.com>
1079         PR c++/56285
1080         * method.c (add_one_base_init): Handle base constructor
1081         taking rvalue reference parm.
1083         PR c++/56291
1084         * semantics.c (sort_constexpr_mem_initializers): Handle
1085         vptr out of order.
1087 2013-02-09  Jason Merrill  <jason@redhat.com>
1089         PR c++/56268
1090         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
1091         maybe_instantiate_noexcept.
1093         PR c++/56247
1094         * pt.c (eq_specializations): Set comparing_specializations.
1095         * tree.c (cp_tree_equal): Check it.
1096         * cp-tree.h: Declare it.
1098         * decl.c (decls_match): Check versions later.
1100         PR c++/56238
1101         * pt.c (build_non_dependent_expr): Don't try to fold
1102         instantiation-dependent expressions.
1103         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
1104         [BIND_EXPR]: Treat as dependent.
1106 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
1108         PR c++/56241
1109         * init.c (build_vec_init): Don't append NULL values into new_vec.
1110         (build_zero_init_1): Don't push anything into v if recursive call
1111         returned NULL_TREE.
1112         (build_value_init_noctor): Don't push anything into v if
1113         build_value_init call returned NULL_TREE.
1115         PR c++/56239
1116         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
1117         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
1118         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
1119         return true only if 2nd token isn't CPP_CLOSE_PAREN.
1120         (cp_parser_cast_expression): Adjust caller.
1122         PR c++/56237
1123         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
1124         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
1125         DECL_LANG_SPECIFIC (t).
1127 2013-02-07  Jason Merrill  <jason@redhat.com>
1129         PR c++/56235
1130         * method.c (do_build_copy_constructor): Don't bother turning
1131         scalars from lvalues to xvalues.
1132         (do_build_copy_assign): Likewise.
1134 2013-02-06  Jason Merrill  <jason@redhat.com>
1136         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
1138 2013-02-05  Jason Merrill  <jason@redhat.com>
1140         PR c++/54122
1141         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
1142         METHOD_TYPE.
1144         PR c++/56177
1145         * decl.c (start_preparsed_function): Update restype if we change
1146         decl1.
1148         PR c++/56208
1149         * pt.c (fn_type_unification): Discard any access checks from
1150         substituting explicit args.
1152 2013-01-31  Jason Merrill  <jason@redhat.com>
1154         PR c++/56162
1155         PR c++/56104
1156         * typeck.c (get_member_function_from_ptrfunc): Fix
1157         ptrmemfunc_vbit_in_delta case.
1159 2013-01-29  Jason Merrill  <jason@redhat.com>
1161         PR libstdc++/54314
1162         * class.c (build_ctor_vtbl_group): Give construction vtables
1163         hidden visibility.
1165 2013-01-25  Jason Merrill  <jason@redhat.com>
1167         PR c++/56095
1168         * pt.c (convert_nontype_argument_function): Handle invalid input.
1169         (convert_nontype_argument): Likewise.
1171         PR c++/56104
1172         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
1173         dynamic type has no virtual functions.
1175 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
1177         PR c++/55944
1178         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
1179         on TARGET_EXPR nodes.
1181 2013-01-22  Jason Merrill  <jason@redhat.com>
1183         PR c++/56071
1184         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
1186 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
1188         PR c++/53609
1189         * pt.c (argument_pack_element_is_expansion_p)
1190         (make_argument_pack_select, use_pack_expansion_extra_args_p)
1191         (gen_elem_of_pack_expansion_instantiation): New static functions.
1192         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
1193         look through the possibly resulting pack expansion as well.
1194         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
1195         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
1196         Use gen_elem_of_pack_expansion_instantiation to build the
1197         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
1198         as gen_elem_of_pack_expansion_instantiation and the change in
1199         tsubst above generalize this particular case.
1200         (arg_from_parm_pack_p): Remove this for it's not used by
1201         tsubst_pack_expansion anymore.
1203 2013-01-21  Jason Merrill  <jason@redhat.com>
1205         PR c++/56059
1206         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
1207         template args count.
1209 2013-01-18  Jason Merrill  <jason@redhat.com>
1211         PR target/54908
1212         * decl2.c (get_local_tls_init_fn): New.
1213         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
1214         with aliases for internal variables.  Don't use weakrefs if
1215         the variable needs destruction.
1216         (generate_tls_wrapper): Mark the wrapper as const if no
1217         initialization is needed.
1218         (handle_tls_init): Don't require aliases.
1220 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
1222         PR c++/55663
1223         * pt.c (coerce_innermost_template_parms): New static function.
1224         (instantiate_alias_template):  Use it here.
1226 2013-01-09  Jason Merrill  <jason@redhat.com>
1228         PR c++/55878
1229         * rtti.c (build_typeid, get_typeid): Add complain parm.
1230         (get_tinfo_decl_dynamic): Likewise.
1231         * cp-tree.h, parser.c, pt.c: Adjust.
1233         PR c++/55893
1234         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
1235         needs destruction.
1237 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
1239         PR c/48418
1240         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
1241         call maybe_constant_value for the negative or too big shift
1242         count warnings.
1244 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
1246         PR c++/55801
1247         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
1248         of the argument is true.
1250 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
1252         * parser.c (cp_parser_initializer_list): Move declaration
1253         of variable non_const to start of lexical block.
1255 2013-01-07  Jason Merrill  <jason@redhat.com>
1257         PR c++/55753
1258         * tree.c (build_aggr_init_expr): Do nothing in a template.
1259         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
1260         a FUNCTION_DECL before tsubsting.
1262 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
1264         PR c++/52343
1265         * pt.c (check_instantiated_arg): Allow type template arguments.
1267 2013-01-04  Jason Merrill  <jason@redhat.com>
1269         PR c++/55877
1270         * decl.c (reset_type_linkage, bt_reset_linkage): New.
1271         (grokdeclarator): Use reset_type_linkage.
1272         * name-lookup.c (binding_table_foreach): Handle null table.
1273         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
1275 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
1277         PR c++/54526 (again)
1278         * parser.c (cp_parser_template_id): Revert core of previous change
1279         (keep adjusted inform message).
1281 2013-01-03  Jason Merrill  <jason@redhat.com>
1283         PR c++/55419
1284         PR c++/55753
1285         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
1286         TREE_CONSTANT.
1288         PR c++/55842
1289         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
1291         PR c++/55856
1292         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
1294         PR c++/53650
1295         * call.c (type_has_extended_temps): New.
1296         * cp-tree.h: Declare it.
1297         * decl.c (check_initializer): Use build_aggr_init for arrays
1298         if it is false.
1299         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
1301 2013-01-02  Jason Merrill  <jason@redhat.com>
1303         PR c++/54325
1304         * call.c (build_new_method_call_1): Don't use build_value_init for
1305         user-provided default constructors.
1307         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
1309         PR c++/55032
1310         PR c++/55245
1311         * tree.c (build_cplus_array_type): Copy layout information
1312         to main variant if necessary.
1314 Copyright (C) 2013 Free Software Foundation, Inc.
1316 Copying and distribution of this file, with or without modification,
1317 are permitted in any medium without royalty provided the copyright
1318 notice and this notice are preserved.