* pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
[official-gcc.git] / gcc / cp / ChangeLog
blob117355975fa2de56d049ba911f55bcadc243c020
1 2014-11-18  Jason Merrill  <jason@redhat.com>
3         * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
5         PR c++/58102
6         * typeck2.c (store_init_value): Set it.
7         * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
8         * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
10 2014-11-17  Jason Merrill  <jason@redhat.com>
12         PR c++/33911
13         * call.c (build_call_a): Don't warn_deprecated_use here.
14         (build_over_call): Or here.
15         * decl2.c (mark_used): Do it here.
16         (is_late_template_attribute): Attribute deprecated is not deferred.
17         (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
18         * parser.c (cp_parser_template_name): Warn about deprecated template.
19         (cp_parser_template_argument): Likewise.
21         PR c++/50473
22         * decl.c (cp_finish_decl): Don't try to process a non-dependent
23         constant initializer for a reference.
24         * pt.c (value_dependent_expression_p): A reference is always
25         dependent.
26         * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
27         on any NOP_EXPRs.
29         Handle C++14 constexpr flow control.
30         * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
31         (cxx_eval_statement_list): New.
32         (cxx_eval_constant_expression): Handle LABEL_EXPR,
33         CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR.  Handle jump
34         semantics of RETURN_EXPR.
35         (many functions): Add jump_target parameter.
36         (returns, breaks, continues, switches, label_matches): New.
37         * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
38         * cp-gimplify.c (begin_bc_block): Set them.
40         * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
41         (genericize_for_stmt): Handle null statement-list.
43         * constexpr.c (use_new_call): Always use new call handling.
45         C++14 constexpr support (minus loops and multiple returns)
46         * constexpr.c (use_new_call): New macro.
47         (build_data_member_initialization): Ignore non-mem-inits.
48         (check_constexpr_bind_expr_vars): Remove C++14 checks.
49         (constexpr_fn_retval): Likewise.
50         (check_constexpr_ctor_body): Do nothing in C++14.
51         (massage_constexpr_body): In C++14 only collect mem-inits.
52         (get_function_named_in_call): Handle null CALL_EXPR_FN.
53         (cxx_bind_parameters_in_call): Build bindings in same order as
54         parameters.  Don't treat iniviref parms specially in new call mode.
55         (cxx_eval_call_expression): If use_new_call, do constexpr expansion
56         based on DECL_SAVED_TREE rather than the massaged constexpr body.
57         Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
58         (is_sub_constant_expr): Don't mess with ctx.ctor here.
59         (cxx_eval_component_reference): A null element means we're mid-
60         initialization.
61         (cxx_eval_store_expression, cxx_eval_increment_expression): New.
62         (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
63         MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
64         PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
65         POSTDECREMENT_EXPR.  Don't look into DECL_INITIAL of variables in
66         constexpr functions.  In new-call mode find parms in the values table.
67         (potential_constant_expression_1): Handle null CALL_EXPR_FN.
68         Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
69         PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
70         POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
71         CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
72         EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
73         CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
74         SWITCH_STMT, ASM_EXPR.
75         (cxx_eval_vec_init_1): Call build_aggr_init_expr.
76         (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
77         caller wants an lvalue.
78         (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
79         (maybe_constant_init): Look through INIT_EXPR.
80         (ensure_literal_type_for_constexpr_object): Set
81         cp_function_chain->invalid_constexpr.
82         * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
83         * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
84         (check_for_uninitialized_const_var): Likewise.
85         (maybe_save_function_definition): Check it.
86         * parser.c (cp_parser_jump_statement): Set
87         cp_function_chain->invalid_constexpr.
88         (cp_parser_asm_definition): Likewise.
90         PR c++/52282
91         * decl.c (build_ptrmemfunc_type): Don't build a different
92         RECORD_TYPE for a qualified PMF.
93         * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
94         (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
95         * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
96         * tree.c (cp_walk_subtrees): Likewise.
97         (cp_build_qualified_type_real): Remove special PMF handling.
99 2014-11-15  Jason Merrill  <jason@redhat.com>
101         * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
102         an expression.
104         * constexpr.c (cxx_eval_builtin_function_call): Use
105         fold_builtin_call_array.
107         * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
109 2014-11-14  Paolo Carlini  <paolo.carlini@oracle.com>
111         * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
112         * parser.c (cp_parser_omp_clause_collapse): Likewise.
113         (cp_parser_enumerator_definition): Don't call
114         instantiate_non_dependent_expr...
115         * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
116         * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
117         * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
118         the final gcc_assert.
120         * constexpr.c (fold_non_dependent_expr): Add.
121         * cp-tree.h (fold_non_dependent_expr): Declare it.
122         * call.c (null_ptr_cst_p): Use it.
123         * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
124         * semantics.c (begin_maybe_infinite_loop): Likewise.
125         * typeck.c (cp_build_binary_op): Likewise.
126         * typeck2.c (check_narrowing): Likewise.
128         * pt.c (fold_non_dependent_expr): Rename to
129         instantiate_non_dependent_expr.
130         (fold_non_dependent_expr_sfinae): Rename to
131         instantiate_non_dependent_expr_sfinae.
132         (convert_nontype_argument, build_non_dependent_expr): Adjust.
133         * decl.c (compute_array_index_type): Likewise.
134         * parser.c (cp_parser_parenthesized_expression_list,
135         cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
136         Likewise.
137         * semantics.c (end_maybe_infinite_loop, finish_static_assert):
138         Likewise.
139         * typeck.c (cxx_alignas_expr): Likewise.
140         * typeck2.c (store_init_value, massage_init_elt): Likewise.
141         * call.c: Adjust comments.
142         * class.c: Likewise.
143         * constexpr.c: Likewise.
144         * decl2.c: Likewise.
145         * tree.c: Likewise.
147 2014-11-14  Jonathan Wakely  <jwakely@redhat.com>
149         * mangle.c (find_substitution): Look for abi_tag on class templates.
151 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
152             Thomas Schwinge  <thomas@codesourcery.com>
153             Ilya Verbin  <ilya.verbin@intel.com>
154             Andrey Turetskiy  <andrey.turetskiy@intel.com>
156         * Make-lang.in (c++.install-common): Do not install for the offload
157         compiler.
159 2014-11-13  Kai Tietz  <ktietz@redhat.com>
161         * cp-tree.h (cp_build_function_call): Remove prototype.
162         (cp_build_addr_expr_strict): Likewise.
163         (build_typed_address): Likewise.
164         * typeck.c (build_typed_address): Removed.
165         (cp_build_addr_expr_strict): Make static.
166         (cp_build_function_call): Likewise.
168 2014-11-12  Paolo Carlini  <paolo.carlini@oracle.com>
170         DR 1510
171         PR c++/60420
172         * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
173         * decl.c (grokdeclarator): Use it.
174         * parser.c (cp_parser_simple_type_specifier): Likewise.
175         * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
177 2014-11-11  Paolo Carlini  <paolo.carlini@oracle.com>
179         PR c++/63265
180         * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
181         constant the condition.
183 2014-11-10  Andi Kleen  <ak@linux.intel.com>
185         * semantics.c (finish_goto_stmt): Call check_no_cilk.
186         (finish_while_stmt_cond): Dito.
187         (finish_do_stmt): Dito.
188         (finish_for_cond): Dito.
189         (finish_switch_cond): Dito.
191 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
193         * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
194         OPT_Wshift_count_overflow in the warnings.
196 2014-11-09  Jason Merrill  <jason@redhat.com>
198         DR 799
199         * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
200         same scalar type is an rvalue.
202         DR 2007
203         * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
205 2014-11-07  Jason Merrill  <jason@redhat.com>
207         DR 1558
208         * pt.c (dependent_alias_template_spec_p): New.
209         (dependent_type_p_r): Handle dependent alias template specialization.
210         (template_args_equal): A dependent alias template specializations
211         is not equal to its underlying type as a template argument.
212         * tree.c (strip_typedefs): Don't strip a dependent alias
213         template-id.
215         * parser.c (cp_parser_unqualified_id): Handle __func__ here.
216         (cp_parser_primary_expression): Not here.
218 2014-11-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>
220         PR c++/63366
221         * decl.c (grokdeclarator): Fix __complex meaning __complex double.
223 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
225         * constexpr.c: Remove redundant enum from machine_mode.
227 2014-10-28  Jason Merrill  <jason@redhat.com>
229         * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
231 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
233         * call.c: Adjust include files.
234         * class.c: Ditto.
235         * decl2.c: Ditto.
236         * decl.c: Ditto.
237         * lambda.c: Ditto.
238         * mangle.c: Ditto.
239         * method.c: Ditto.
240         * optimize.c: Ditto.
241         * parser.c: Ditto.
242         * semantics.c: Ditto.
243         * tree.c: Ditto.
244         * vtable-class-hierarchy.c: Ditto.
246 2014-10-24  Jason Merrill  <jason@redhat.com>
248         Implement N3653 (Member initializers and aggregates) and fix
249         references to 'this' in constexpr constructors.
250         * class.c (check_field_decls): In C++14 an NSDMI does not make the
251         class non-aggregate.
252         * constexpr.c (struct constexpr_ctx): New.
253         (cxx_bind_parameters_in_call): Handle 'this'.
254         (cxx_eval_call_expression): Create new constexpr_ctx.
255         (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
256         (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
257         (cxx_eval_bare_aggregate): Use them.  Build CONSTRUCTOR early.
258         (cxx_eval_vec_init_1): Likewise.
259         (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
260         [TARGET_EXPR]: Build new constexpr_ctx.
261         [PLACEHOLDER_EXPR]: New.
262         (cxx_eval_outermost_constant_expr): Build new constexpr_ctx.  Add
263         object parameter.
264         (is_sub_constant_expr): Build new constexpr_ctx.
265         (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
266         Allow 'this'.
267         * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
268         * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
269         * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
270         * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
271         * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
272         (build_ctor_subob_ref, replace_placeholders): New.
273         * typeck2.c (store_init_value): Use replace_placeholders.
274         (process_init_constructor_record): Make zero-init before NSDMI
275         explicit.
277 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
279         * cp-gimplify.c: Adjust include files.
281 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
283         PR c++/53061
284         * cp-objcp-common.c: Do not include new.
285         (cxx_initialize_diagnostics): Move from here to ...
286         * error.c (cxx_initialize_diagnostics): : ... here. Move
287         diagnostics initialization here from init_error.
288         (cxx_pp): Use a real pointer not a macro.
289         (init_error): Just initialize cxx_pp.
290         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
291         not set maximum line length.
293 2014-10-23  Jonathan Wakely  <jwakely@redhat.com>
295         PR c++/63619
296         * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
298 2014-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
300         * parser.c (cp_parser_unary_expression): Add default arguments.
301         (cp_parser_cast_expression, cp_parser_sizeof_operand,
302         cp_parser_omp_atomic): Adjust.
304 2014-10-20  Jason Merrill  <jason@redhat.com>
306         PR c++/63601
307         * lambda.c (current_nonlambda_function): New.
308         * semantics.c (finish_this_expr): Use it.
309         * cp-tree.h: Declare it.
311 2014-10-17  Alan Modra  <amodra@gmail.com>
313         PR middle-end/61848
314         * decl.c (merge_decls): Don't merge section name, comdat group or
315         tls model to newdecl symtab node, instead merge to olddecl.
316         Override existing olddecl section name.  Set tls_model for all
317         thread-local vars, not just OMP thread-private ones.  Remove
318         incorrect comment.
320 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
322         * cp-tree.h: Adjust include files.
324 2014-10-15  Jason Merrill  <jason@redhat.com>
326         PR c++/63528
327         * pt.c (lookup_template_variable): Call coerce_template_parms.
329 2014-10-15  Paolo Carlini  <paolo.carlini@oracle.com>
331         * semantics.c (is_instantiation_of_constexpr, literal_type_p,
332         ensure_literal_type_for_constexpr_object,
333         constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
334         retrieve_constexpr_fundef, is_valid_constexpr_fn,
335         build_anon_member_initialization, build_data_member_initialization,
336         check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
337         check_constexpr_ctor_body, sort_constexpr_mem_initializers,
338         build_constexpr_constructor_member_initializers, constexpr_fn_retval,
339         massage_constexpr_body, cx_check_missing_mem_inits,
340         register_constexpr_fundef, explain_invalid_constexpr_fn,
341         constexpr_call_hasher::hash, constexpr_call_hasher::equal,
342         maybe_initialize_constexpr_call_table, get_function_named_in_call,
343         get_nth_callarg, lookup_parameter_binding,
344         cxx_eval_builtin_function_call, adjust_temp_type,
345         cxx_bind_parameters_in_call, push_cx_call_context,
346         pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
347         reduced_constant_expression_p, verify_constant,
348         cxx_eval_unary_expression, cxx_eval_binary_expression,
349         cxx_eval_conditional_expression, cxx_eval_array_reference,
350         cxx_eval_component_reference, cxx_eval_bit_field_ref,
351         cxx_eval_logical_expression, base_field_constructor_elt,
352         cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
353         cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
354         cxx_eval_trinary_expression, var_in_constexpr_fn,
355         cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
356         is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
357         maybe_constant_init, potential_constant_expression_1,
358         potential_constant_expression, potential_rvalue_constant_expression,
359         require_potential_constant_expression,
360         require_potential_rvalue_constant_expression): Moved definitions...
361         * constexpr.c: ... here, new file.
362         * Make-lang.in: Update.
363         * config-lang.in: Likewise.
365 2014-10-14  Jason Merrill  <jason@redhat.com>
367         PR c++/63455
368         * parser.c (struct saved_token_sentinel): New.
369         (cp_parser_statement): Use it.
370         (cp_parser_start_tentative_firewall): New.
371         (cp_parser_end_tentative_firewall): New.
372         (cp_parser_lambda_expression): Use them.
373         (cp_parser_statement_expr): New.
374         (cp_parser_primary_expression): Use it.
376 2014-10-14  DJ Delorie  <dj@redhat.com>
378         * typeck.c (cp_common_type): Check for all __intN types, not just
379         __int128.
380         * decl.c (grokdeclarator): Likewise.
381         * rtti.c (emit_support_tinfos): Check for all __intN types, not just
382         __int128.
383         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
384         for all __intN types, not just __int128.
385         (cp_parser_simple_type_specifier): Likewise.
386         * mangle.c (integer_type_codes): Remove int128-specific codes.
387         * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
388         __intN was specified.
389         * lex.c (init_reswords): Reserve all __intN keywords.
391 2014-10-14  Marc Glisse  <marc.glisse@inria.fr>
393         * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
395 2014-10-13  H.J. Lu  <hongjiu.lu@intel.com>
397         * mangle.c (mangle_conv_op_name_for_type): Cast elements to
398         unsigned long.
399         (print_template_statistics): Cast size and elements to long.
401 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
403         * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
404         pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
405         hashtab.
407 2014-10-10  Jason Merrill  <jason@redhat.com>
409         PR c++/62115
410         * class.c (build_base_path): Preserve rvalueness.
411         * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
412         * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
414         PR c++/63194
415         * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
417         * method.c (implicitly_declare_fn): Handle deleted lambda default
418         ctor and copy assop here.
419         * class.c (check_bases_and_members): Not here.
420         (add_implicitly_declared_members): And don't set
421         CLASSTYPE_LAZY_MOVE_ASSIGN.
423         * semantics.c (finish_id_expression): Check for error_mark_node.
425 2014-10-09  Jason Merrill  <jason@redhat.com>
427         PR c++/63207
428         * semantics.c (outer_var_p): Non-static.
429         (process_outer_var_ref): Split out from finish_id_expression.
430         * pt.c (tsubst_copy_and_build): Call them.
431         * cp-tree.h: Declare them.
433 2014-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
435         * semantics.c (check_constexpr_ctor_body_1): New.
436         (check_constexpr_ctor_body): Use it; add bool parameter.
437         (build_data_member_initialization): Handle BIND_EXPR and
438         USING_STMT in the main conditional.
439         (build_constexpr_constructor_member_initializers): Do not
440         handle BIND_EXPR here.
441         (constexpr_fn_retval): Handle BIND_EXPR in the switch.
442         (massage_constexpr_body): Don't do it here.
443         * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
444         Adjust check_constexpr_ctor_body call.
445         (cp_parser_compound_statement): Do not pedwarn for compound-statement
446         in constexpr function in C++14 mode.
447         * cp-tree.h (check_constexpr_ctor_body): Update declaration.
449 2014-10-09  Jason Merrill  <jason@redhat.com>
451         PR c++/63309
452         * parser.c (cp_parser_class_head): push_template_decl for members
453         of templates, too.
455         PR c++/63415
456         * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
457         (iterative_hash_template_arg): Likewise.
459         PR c++/63437
460         * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
461         * semantics.c (force_paren_expr): And set it.
462         * typeck.c (check_return_expr): And handle it.
464 2014-10-09  Marc Glisse  <marc.glisse@inria.fr>
466         * decl.c (grokdeclarator): constexpr only implies const in C++11.
468 2014-10-08  Jason Merrill  <jason@redhat.com>
470         PR c++/63405
471         * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
473         PR c++/63485
474         * tree.c (build_cplus_array_type): Look for a type with no
475         typedef-name or attributes.
477         * call.c (call_copy_ctor): New.
478         (build_over_call): Use it to avoid infinite recursion on invalid code.
480 2014-10-07  Jason Merrill  <jason@redhat.com>
482         * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
484 2014-10-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
486         * cp/parser.c: Allow [[deprecated]] for C++11.  Issue a pedwarn.
488 2014-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
490         PR c++/55250
491         * semantics.c (check_constexpr_bind_expr_vars): New.
492         (check_constexpr_ctor_body, massage_constexpr_body): Use it.
493         (build_constexpr_constructor_member_initializers): Handle
494         BIND_EXPR in the main conditional.
496 2014-10-02  Mark Wielaard  <mjw@redhat.com>
498         PR debug/63239
499         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
500         (cp_function_decl_deleted_p): New prototype.
501         * cp-objcp-common.c (cp_function_deleted_p): New function.
503 2014-10-03  Marc Glisse  <marc.glisse@inria.fr>
505         PR c++/54427
506         PR c++/57198
507         PR c++/58845
508         * typeck.c (cp_build_binary_op): save_expr after convert to save
509         redundant operations.
510         [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
511         (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
513 2014-10-03  Jason Merrill  <jason@redhat.com>
515         * decl.c (start_decl): Complain about static/thread_local vars
516         in constexpr function.
517         (check_for_uninitialized_const_var): Also uninitialized vars.
518         * parser.c (cp_parser_jump_statement): And gotos.
519         (cp_parser_asm_operand_list): And asm.
520         (cp_parser_try_block): And try.
521         * semantics.c (ensure_literal_type_for_constexpr_object): And
522         non-literal.
524         * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
525         (var_in_constexpr_fn): New.
526         (cxx_eval_constant_expression): Look into DECL_INITIAL.
527         (potential_constant_expression_1): Allow constexpr-local vars.
529         PR c++/63362
530         * tree.c (strip_typedefs): Handle TREE_LIST.
532 2014-10-03  Paolo Carlini  <paolo.carlini@oracle.com>
534         * parser.c (cp_parser_assignment_expression,
535         cp_parser_constant_expression): Add default arguments.
536         (cp_parser_primary_expression,
537         cp_parser_postfix_open_square_expression,
538         cp_parser_parenthesized_expression_list,
539         cp_parser_question_colon_clause,
540         cp_parser_expression, cp_parser_constant_expression,
541         cp_parser_label_for_labeled_statement, cp_parser_static_assert,
542         cp_parser_template_argument, cp_parser_enumerator_definition,
543         cp_parser_member_declaration, cp_parser_constant_initializer,
544         cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
545         cp_parser_std_attribute_spec, cp_parser_objc_message_args,
546         cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
547         cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
548         cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
549         cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
550         cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
552 2014-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
554         PR c++/53025
555         * cp-tree.h (struct saved_scope): Add noexcept_operand.
556         (cp_noexcept_operand): Define.
557         * call.c (build_over_call): Use it.
558         * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
559         * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
561 2014-10-01  Jason Merrill  <jason@redhat.com>
563         PR c++/63362
564         * method.c (constructible_expr): Handle value-init of non-class.
565         * parser.c (cp_parser_trait_expr): Allow pack expansion.
566         * pt.c (tsubst_copy_and_build): Handle pack expansion.
568         PR c++/63362
569         * class.c (type_has_non_user_provided_default_constructor): Rename
570         from type_has_user_provided_default_constructor, reverse sense.
571         (default_init_uninitialized_part, explain_non_literal_class): Adjust.
572         (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
573         * call.c (build_new_method_call_1): Adjust.
574         * cp-tree.h: Adjust.
575         * decl.c (grok_special_member_properties): Don't set
576         TYPE_HAS_COMPLEX_DFLT.
577         * init.c (build_value_init_noctor): Don't use
578         type_has_user_provided_default_constructor.
580 2014-09-30  Jason Merrill  <jason@redhat.com>
582         * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
583         CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
584         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
585         * parser.c (cp_parser_primary_expression): Likewise.
586         (cp_parser_trait_expr): Likewise.  Handle variadic trait.
587         * semantics.c (trait_expr_value): Likewise.
588         (finish_trait_expr): Likewise.
589         (check_trait_type): Handle variadic trait.  Return bool.
590         * method.c (build_stub_object): Add rvalue reference here.
591         (locate_fn_flags): Not here.
592         (check_nontriv, assignable_expr, constructible_expr): New.
593         (is_trivially_xible): New.
595         * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
596         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
597         * parser.c (cp_parser_primary_expression): Likewise.
598         (cp_parser_trait_expr): Likewise.
599         * semantics.c (trait_expr_value): Likewise.
600         (finish_trait_expr): Likewise.
602         * method.c (build_stub_object): Use CONVERT_EXPR.
603         * tree.c (build_dummy_object): Likewise.
604         (is_dummy_object): Adjust.
606         * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
607         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
608         * semantics.c (trait_expr_value): Likewise.
609         (finish_trait_expr): Likewise.
610         * parser.c (cp_parser_primary_expression): Likewise.
611         (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
613 2014-09-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
615        PR c++/16564
616        * error.c (print_instantiation_context): Delete.
617        * typeck2.c (build_x_arrow): Record location when pushing
618        template instantiation.
619        * pt.c (push_tinst_level): Make it a wrapper around ...
620        (push_tinst_level_loc): ... this. New function. Make excessive
621        template instantiation depth a fatal error. Record location. Use
622        bool as return type.
623        (instantiate_pending_templates): Make excessive
624        template instantiation depth a fatal error.
625        (problematic_instantiation_changed): Use bool as return type.
626        * cp-tree.h (print_instantiation_context): Delete.
627        (push_tinst_level): Update declaration.
628        (problematic_instantiation_changed): Likewise.
629        (push_tinst_level_loc): New.
631 2014-09-29  Richard Biener  <rguenther@suse.de>
633         * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
634         for conversions.
636 2014-09-26  Jason Merrill  <jason@redhat.com>
638         * mangle.c (find_substitution): Use write_abi_tags.
640 2014-09-25  Marek Polacek  <polacek@redhat.com>
642         PR c++/61945
643         * class.c (warn_hidden): Check for FUNCTION_DECL.
645 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
647         PR c++/63249
648         * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
649         on low_bound and length.
651 2014-09-24  Aldy Hernandez  <aldyh@redhat.com>
653         * class.c, decl.c, optimize.c: Rename all instances of
654         DECL_ABSTRACT to DECL_ABSTRACT_P.
656 2014-09-24  Marek Polacek  <polacek@redhat.com>
658         PR c/61405
659         PR c/53874
660         * semantics.c (finish_switch_cond): Call unlowered_expr_type.
661         * tree.c (bot_manip): Add default case.
662         * parser.c (cp_parser_primary_expression): Cast the controlling
663         expression of a switch to an int.
664         (cp_parser_unqualified_id): Likewise.
666 2014-09-23  Paolo Carlini  <paolo.carlini@oracle.com>
668         PR c++/61857
669         * parser.c (cp_parser_skip_to_closing_square_bracket,
670         cp_parser_array_designator_p): New.
671         (cp_parser_initializer_list): Use the latter.
673 2014-09-22  Jason Merrill  <jason@redhat.com>
675         * semantics.c (finish_non_static_data_member): In diagnostic, give
676         error at point of use and note at point of declaration.
678         PR c++/63320
679         PR c++/60463
680         PR c++/60755
681         * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
682         not finding 'this'.
684 2014-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
686         PR c++/62219
687         * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
689 2014-09-22  Jason Merrill  <jason@redhat.com>
691         * decl.c (poplevel): Don't warn about unused vars in template scope.
692         * error.c (dump_decl): Handle variable templates.
694 2014-09-20  Jason Merrill  <jason@redhat.com>
696         PR c++/62017
697         * decl.c (begin_destructor_body): Only clobber the as-base part of
698         *this.
700 2014-09-19  Jason Merrill  <jason@redhat.com>
702         PR c++/61392
703         * mangle.c (write_expression): Use unresolved-name mangling for
704         DR850 case.
706         PR c++/61465
707         * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
708         after pulling out an element from a CONSTRUCTOR.
710 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
712         PR c++/63248
713         * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
714         on type of type dependent expressions, and don't call it if
715         handle_omp_array_sections has kept TREE_LIST because something
716         was type dependent.
717         * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
718         Use keep_next_level, begin_omp_structured_block and
719         finish_omp_structured_block instead of push_stmt_list and
720         pop_stmt_list.
722 2014-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
724         PR c++/62232
725         * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
726         for final class types.
728 2014-09-15  Jason Merrill  <jason@redhat.com>
730         * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
731         necessary.  Call inherit_targ_abi_tags here.
732         * class.c (check_bases_and_members): Not here.
733         (inherit_targ_abi_tags): Check CLASS_TYPE_P.
734         * cp-tree.h: Declare inherit_targ_abi_tags.
736 2014-09-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
738         Do not diagnose lambda default arguments in c++14 modes.
739         * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
740         conditional.
742 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
744         * Make-lang.in (check_g++_parallelize): Change to just an upper bound
745         number.
747 2014-09-13  Marek Polacek  <polacek@redhat.com>
749         PR c++/60862
750         * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
751         location of a call expression.
753 2014-09-11  Jason Merrill  <jason@redhat.com>
755         PR c++/63201
756         * decl.c (start_decl): Handle specialization of member variable
757         template.
758         * pt.c (check_explicit_specialization): Adjust error.
760 2014-09-11  Paolo Carlini  <paolo.carlini@oracle.com>
762         PR c++/61489
763         * typeck2.c (process_init_constructor_record): Do not warn about
764         missing field initializer if EMPTY_CONSTRUCTOR_P (init).
766 2014-09-11  Jason Merrill  <jason@redhat.com>
768         PR c++/63139
769         * pt.c (tsubst_pack_expansion): Simplify substitution into T....
770         (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
772 2014-09-10  Jason Merrill  <jason@redhat.com>
774         PR c++/61659
775         * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
776         (duplicate_decls, start_decl): Likewise.
777         * pt.c (check_explicit_specialization): Likewise.
778         (push_template_decl_real): Or static templates.
780 2014-09-08  Jason Merrill  <jason@redhat.com>
782         * typeck.c (build_class_member_access_expr): Move
783         -Winvalid-offsetof code...
784         * semantics.c (finish_offsetof): ...here.
785         * parser.c (cp_parser_builtin_offsetof): Remember the location of
786         the type argument.
787         * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
789         PR c++/62255
790         * pt.c (instantiate_decl): Handle recursive instantiation of
791         static data member.
793 2014-09-05  Jason Merrill  <jason@redhat.com>
795         PR c++/62659
796         * semantics.c (potential_constant_expression_1): Handle un-folded
797         pointer to member constants.
799 2014-09-04  Markus Trippelsdorf  <markus@trippelsdorf.de>
801         PR ipa/61659
802         * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
803         newdecl, not olddecl.
805 2014-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
807         DR 1453
808         * class.c (check_field_decls): A class of literal type cannot have
809         volatile non-static data members and base classes.
810         (explain_non_literal_class): Update.
812 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
813             Balaji V. Iyer  <balaji.v.iyer@intel.com>
814             Igor Zamyatin  <igor.zamyatin@intel.com>
816         * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
817         simplified.
818         * parser.c (cp_parser_cilk_for): New function.
819         (cp_parser_cilk_grainsize): Likewise.
820         (cp_parser_statement): Added RID_CILK_FOR case.
821         (cp_parser_omp_for_cond): Added CILK_FOR check.
822         (cp_parser_omp_for_loop_init): Change function argument to accept
823         tree_code instead just a bool flag; change the check to use that
824         tree_code; check for initialization declaration in case of Cilk_for.
825         (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
826         changed call to cp_parser_omp_for_loop_init according new arguments'
827         list.
828         (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
829         * pt.c (tsubst_expr): Added CILK_FOR case.
830         * semantics.c: Include convert.h.
831         (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
832         case; added OMP_CLAUSE__CILK_FOR_COUNT_.
833         (handle_omp_for_class_iterator): New argument lastp and its usage;
834         added NE_EXPR case.
835         (finish_omp_for): Changed call to handle_omp_for_class_iterator
836         according new arguments' list; in case of Cilk_for save very first
837         decl and create empty stmt_list block; use block to build correct
838         statement tree.
840 2014-08-31  Jason Merrill  <jason@redhat.com>
842         PR c++/62302
843         * optimize.c (cdtor_comdat_group): Just look at the
844         DECL_ASSEMBLER_NAME of the 'tors.
846 2014-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
848         PR c++/52892
849         * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
850         result of cxx_eval_constant_expression.
852 2014-08-26  Jason Merrill  <jason@redhat.com>
854         PR c++/58624
855         * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
856         (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
857         * semantics.c (finish_id_expression): Don't call TLS wrapper in a
858         template.
860 2014-08-25  Jason Merrill  <jason@redhat.com>
862         * pt.c (check_explicit_specialization): Don't complain about
863         non-template variable.
864         (template_for_substitution): Allow variable templates.
865         (check_template_variable): Fix logic for member var template.
866         * decl.c (start_decl): Don't complain about extra template header
867         here.
869         * decl.c (start_decl): Look through member variable template.
870         * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
871         * decl2.c (grokfield): Set DECL_CONTEXT earlier on
872         variables.
874 2014-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
876         PR c++/34938
877         * cp-tree.h (TFF_POINTER): Add.
878         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
879         argument too.
880         * error.c (dump_type_suffix): Actually print the const and noreturn
881         attribute when appropriate.
883 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
885         * decl.c (compute_array_index_type, grokdeclarator,
886         undeduced_auto_decl): Change from cxx1y to cxx14.
887         *lambda.c(add_capture()): Change error message from C++1y to C++14.
888         * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
889         cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
890         cp_parser_decltype, cp_parser_conversion_type_id,
891         cp_parser_simple_type_specifier, cp_parser_type_id_1,
892         cp_parser_template_type_arg, cp_parser_std_attribute,
893         cp_parser_template_declaration_after_export): Ditto.
894         * pt.c (tsubst): Ditto.
895         * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
896         * tree.c: Change comment.
897         * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
898         cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
900 2014-08-23  Jason Merrill  <jason@redhat.com>
902         Allow non-constexpr variable templates.
903         * decl2.c (note_variable_template_instantiation): New.
904         * cp-tree.h: Declare it.
905         * pt.c (instantiate_decl): Call it.
906         (push_template_decl_real): Allow non-constexpr variable templates.
907         * semantics.c (finish_id_expression): Mark the variable template
908         instantiation as used.
909         * mangle.c (write_mangled_name): Variable template instantiations
910         are mangled.
911         * parser.c (cp_parser_init_declarator): Complain about
912         non-function implicit templates.
914 2014-08-22  Marek Polacek  <polacek@redhat.com>
916         PR c++/62199
917         * parser.c (cp_parser_binary_expression): Check each LHS if it's
918         preceded with logical not.  Adjust call to
919         warn_logical_not_parentheses.
921 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
923         PR c++/57709
924         * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
925         declaration shadows a function declaration, unless the former
926         declares a function, pointer to function or pointer to member
927         function, because this is a common and valid case in real-world
928         code.
929         * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
930         Improve description.
932 2014-08-22  Jason Merrill  <jason@redhat.com>
934         PR c++/62129
935         * class.c (outermost_open_class): Fix logic.
936         * decl.c (complete_vars): Fix logic.
938 2014-08-22  Jason Merrill  <jason@redhat.com>
940         PR c++/62129
941         * class.c (outermost_open_class): New.
942         * cp-tree.h: Declare it.
943         * decl.c (maybe_register_incomplete_var): Use it.
944         (complete_vars): Handle any constant variable.
945         * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
947 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
949         PR other/62008
950         * cp-array-notation.c (build_array_notation_ref): Added correct
951         handling of case with incorrect array.
953 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
955         PR fortran/44054
956         * error.c (cp_diagnostic_finalizer): Delete.
957         (init_error): Do not set diagnostic_finalizer here.
959 2014-08-19  Marek Polacek  <polacek@redhat.com>
961         PR c++/62153
962         * call.c (build_new_op_1): Remember the type of arguments for
963         a comparison.  If either operand of a comparison is a boolean
964         expression, call maybe_warn_bool_compare.
966 2014-08-19  Jason Merrill  <jason@redhat.com>
968         PR tree-optimization/62091
969         * decl2.c (decl_needed_p): Return true for virtual functions when
970         devirtualizing.
972         PR lto/53808
973         PR c++/61659
974         * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
975         comdat_linkage.
977 2014-08-19  Gerald Pfeifer  <gerald@pfeifer.com>
979         * class.c (contains_empty_class_p): Remove.
981 2014-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
983         * parser.c (cp_parser_expression): Add default arguments.
984         (cp_parser_primary_expression, cp_parser_postfix_expression,
985         cp_parser_array_notation, cp_parser_postfix_open_square_expression,
986         cp_parser_unary_expression, cp_parser_direct_new_declarator,
987         cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
988         cp_parser_lambda_body, cp_parser_expression_statement,
989         cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
990         cp_parser_iteration_statement, cp_parser_jump_statement,
991         cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
992         cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
993         cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
994         cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
995         cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
996         cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
997         cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
998         cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
999         cp_parser_transaction_expression): Adjust.
1001 2014-08-15  Jason Merrill  <jason@redhat.com>
1003         PR c++/61566
1004         * pt.c (lookup_template_class_1): Revert recent change.
1005         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1007         PR c++/61566
1008         * pt.c (instantiate_class_template_1): Ignore lambda on
1009         CLASSTYPE_DECL_LIST.
1010         (push_template_decl_real): A lambda is not primary.
1011         (lookup_template_class_1): Don't look for a lambda partial
1012         instantiation.
1013         * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1014         currently in a function and the lambda living in a function.
1015         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1017 2014-08-15  Richard Biener  <rguenther@suse.de>
1018             Jason Merrill  <jason@redhat.com>
1020         PR bootstrap/62077
1021         * tree.c (build_min_array_type, set_array_type_canon): Split out...
1022         (build_cplus_array_type): ...from here.  Only call build_array_type
1023         for main variants.
1025 2014-08-15  Paolo Carlini  <paolo.carlini@oracle.com>
1027         PR c++/62072
1028         Revert:
1029         2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1031         DR 1584
1032         PR c++/57466
1033         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1034         cv-qualifiers of function types.
1036 2014-08-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1038         * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1040 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1042         * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1043         cp_build_array_ref, cp_build_function_call_vec): When a
1044         pedwarn is suppressed under SFINAE, return error_mark_node.
1046         * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1047         tf_warning_or_error, where complain is a bool, glitch.
1049 2014-08-14  Ville Voutilainen  <ville.voutilainen@gmail.com>
1051         PR c++/62101
1052         * decl.c (grokdeclarator): Move the check for friend initializers..
1053         * decl2.c (grokfield) ..here. Postpone early return for friends
1054         until after the initializer check.
1056 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1058         PR c++/54377
1059         * pt.c (coerce_template_parms): Improve error message vs default
1060         arguments.
1062 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1064         * parser.c (cp_parser_init_declarator): Remove redundant check of
1065         decl_specifiers->type.
1067 2014-08-13  Jason Merrill  <jason@redhat.com>
1069         * call.c (build_x_va_arg): Support passing non-POD through ....
1070         (convert_arg_to_ellipsis): Likewise.
1072 2014-08-13  Andrew Sutton  <andrew.n.sutton@gmail.com>
1074         * pt.c (lookup_template_variable): Make dependent variable templates
1075         have unknown type.
1077 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
1079         * parser.c (cp_parser_elaborated_type_specifier): Handle
1080         specially cp_parser_template_id returning a BASELINK.
1082 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
1084         * parser.c (cp_parser_diagnose_invalid_type_name,
1085         cp_parser_make_typename_type): Remove scope parameter.
1086         (cp_parser_parse_and_diagnose_invalid_type_name,
1087         cp_parser_elaborated_type_specifier): Adjust calls.
1089 2014-08-12  Ville Voutilainen  <ville.voutilainen@gmail.com>
1091         Reject virt-specifiers on friends and member templates
1092         * friend.c (do_friend): Diagnose virt-specifiers.
1093         * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1095 2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
1097         * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1098         return type to bool; in C++11 for constants give errors, not pedwarns.
1099         * cp-tree.h (check_narrowing): Adjust declaration.
1100         * call.c (convert_like_real): Update calls.
1101         * semantics.c (finish_compound_literal): Likewise.
1103 2014-08-08  Jason Merrill  <jason@redhat.com>
1105         * pt.c (lookup_template_class_1): Copy abi_tag.
1107 2014-08-08  Kai Tietz  <ktietz@redhat.com>
1109         * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1110         that we operate on a true inline.
1112 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
1114         * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1115         optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1117 2014-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
1119         PR c++/51312
1120         * decl.c (build_enumerator): Handle class types with conversion
1121         operators via perform_implicit_conversion_flags and
1122         build_expr_type_conversion.
1124         * cvt.c (build_expr_type_conversion): Replace pair of errors
1125         with error + inform.
1127 2014-08-07  Jason Merrill  <jason@redhat.com>
1129         PR c++/62043
1130         * parser.c (c_parse_file): Change sorry to fatal_error.
1132         PR c++/61959
1133         * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1135 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
1137         * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1139 2014-08-06  Jason Merrill  <jason@redhat.com>
1141         * init.c (build_vec_init): Fix constant initialization of
1142         trailing elements.
1143         (build_value_init_noctor): Call maybe_constant_init.
1144         * semantics.c (maybe_constant_init): See through EXPR_STMT and
1145         conversion to void.
1147         PR c++/60417
1148         * init.c (build_vec_init): Reorganize earlier change a bit.
1150         PR c++/61994
1151         * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1152         if we're just returning an INIT_EXPR.
1154 2014-08-06  Jason Merrill  <jason@redhat.com>
1155             Braden Obrzut  <admin@maniacsvault.net>
1157         * pt.c (check_explicit_specialization): Don't test
1158         DECL_DECLARED_INLINE_P for a variable template.
1160 2014-08-06  Paolo Carlini  <paolo.carlini@oracle.com>
1162         PR c++/43906
1163         * typeck.c (cp_build_binary_op): Extend to more cases the
1164         -Waddress warning.
1166 2014-08-01  Braden Obrzut  <admin@maniacsvault.net>
1168         Implement constexpr variable templates
1169         * decl.c (grokvardecl): Handle specializations of variable templates.
1170         (grokdeclarator): Handle variable template id expressions and NULL_TREE
1171         return from grokvardecl.
1172         * decl2.c (check_member_template): Allow declaration of template member
1173         variables.
1174         * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1175         variable templates.
1176         * pt.c (check_template_variable): Accept variable temploids at
1177         non-class scope.
1178         (push_template_decl_real): The current instantiation of a template
1179         can be a VAR_DECL.
1180         (determine_specialization): Accept variable templates.
1181         (check_explicit_specialization): Handle and check for malformed
1182         variable template specializations.
1183         (lookup_template_variable): New.
1184         (tsubst_decl): Handle variable template specializations.
1185         (do_decl_instantiation): Handle template variables.
1186         (instantiate_decl): Handle template variables.
1187         * semantics.c (finish_template_variable): New.
1188         (finish_id_expression): Instantiate variable templates.
1189         * cp-tree.h (variable_template_p): New.
1191 2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
1193         PR c++/15339
1194         * decl.c (check_redeclaration_no_default_args): New.
1195         (duplicate_decls): Use it, handle default arguments
1196         in redeclarations of function templates.
1198 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1200         * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1202 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1204         * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1205         method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1206         instead of pointer_set.
1208 2014-08-01  Jason Merrill  <jason@redhat.com>
1210         PR c++/60417
1211         * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1212         init-list for trailing elements.
1213         * typeck2.c (process_init_constructor_array): Likewise.
1215 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
1217         DR 217 again
1218         * decl.c (duplicate_decls): Handle static member functions too.
1220 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1222         * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1223         in error output.
1225 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1227         PR other/61963
1228         * parser.c (cp_parser_array_notation): Added check for array_type.
1230 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1232         PR middle-end/61455
1233         * cp-array-notation.c (expand_array_notation_exprs): Handling of
1234         DECL_EXPR improved. Changed handling for INIT_EXPR.
1236 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
1238         * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1240 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
1242         * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1243         -fsanitize=alignment call ubsan_maybe_instrument_reference
1244         for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1245         for calls to member functions.
1247 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
1249         PR c++/60517
1250         * typeck.c (maybe_warn_about_returning_address_of_local): Return
1251         whether it is returning the address of a local variable.
1252         (check_return_expr): Return 0 instead of the address of a local
1253         variable.
1255 2014-07-30  Jason Merrill  <jason@redhat.com>
1257         PR lto/53808
1258         PR c++/61659
1259         * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1261 2014-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1263         PR c++/57397
1264         * pt.c (unify_arity): Add boolean parameter.
1265         (unify_too_few_arguments): Likewise.
1266         (type_unification_real): Diagnose correctly insufficient
1267         arguments in the presence of trailing variadic parameters;
1268         deducing multiple trailing packs as empty is fine.
1270 2014-07-30  Jason Merrill  <jason@redhat.com>
1272         PR c++/61659
1273         PR c++/61687
1274         Revert:
1275         * decl2.c (mark_all_virtuals): New variable.
1276         (maybe_emit_vtables): Check it instead of flag_devirtualize.
1277         (cp_write_global_declarations): Set it and give helpful diagnostic
1278         if it introduces errors.
1279         * class.c (finish_struct_1): Check it.
1281         PR lto/53808
1282         PR c++/61659
1283         * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1284         (check_explicit_specialization): Clear it on specializations.
1285         * decl.c (duplicate_decls, start_decl): Likewise.
1286         (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1287         * method.c (implicitly_declare_fn): Set DECL_COMDAT.  Determine
1288         linkage after setting the appropriate flags.
1289         * tree.c (decl_linkage): Don't check DECL_COMDAT.
1290         * decl2.c (mark_needed): Mark clones.
1291         (import_export_decl): Not here.
1293 2014-07-25  Edward Smith-Rowland  <3dw4rd@verizon.net>
1295         Implement N4051 - Allow typename in a template template parameter
1296         * parser.c (cp_parser_type_parameter_key): New funtion;
1297         (cp_parser_token_is_type_parameter_key): Ditto;
1298         (cp_parser_type_parameter): Look for type-parameter-key for all versions
1299         but pedwarn for less than cxx1z.
1301 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
1303         PR c++/50961
1304         * call.c (standard_conversion): Use resolve_nondeduced_context
1305         for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1307 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
1309         PR c++/61804
1310         * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1311         for '++' and '--'.
1313 2014-07-15  Jason Merrill  <jason@redhat.com>
1315         PR c++/61811
1316         * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1318         PR c++/60848
1319         PR c++/61723
1320         * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1321         * class.c (finish_struct): Reject invalid definition of
1322         std::initializer_list.
1324 2014-07-15  Paolo Carlini  <paolo.carlini@oracle.com>
1326         * call.c (convert_like_real): Call print_z_candidate and inform only
1327         if permerror returns true.
1329 2014-07-14  Jan Hubicka  <hubicka@ucw.cz>
1331         * class.c (build_clone): Do not clear assembler names of
1332         templates.
1333         * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1334         * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1335         as a special case return sizeof (struct tree_decl_non_common)
1336         for other decls.
1337         (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1338         initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1339         * cp/cp-tree.h (tree_template_decl): New structure.
1340         (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1341         (union cp_lang_tree_node): Add template_decl.
1342         (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1344 2014-07-14  Jason Merrill  <jason@redhat.com>
1346         PR c++/61445
1347         PR c++/56947
1348         * pt.c (instantiate_decl): Don't check defer_ok for local class
1349         members.
1351 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
1353         PR middle-end/61294
1354         * cp-tree.h (LITERAL_ZERO_P): Define.
1355         * parser.c (cp_parser_parenthesized_expression_list): Add
1356         want_literal_zero_p argument, if true, for literal zeros
1357         insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1358         (cp_parser_postfix_expression): Adjust
1359         cp_parser_parenthesized_expression_list caller, handle
1360         -Wmemset-transposed-args.
1361         (literal_zeros): New variable.
1363 2014-07-13  Jason Merrill  <jason@redhat.com>
1365         PR c++/58511
1366         * semantics.c (is_instantiation_of_constexpr): Return true for
1367         defaulted functions, too.
1368         (explain_invalid_constexpr_fn): Only use
1369         explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1370         * method.c (explain_implicit_non_constexpr): Pass
1371         DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1373         PR c++/58611
1374         * decl.c (check_initializer): Don't finish_compound_literal
1375         on erroneous constexpr init.
1377         PR c++/58612
1378         * tree.c (bot_replace): Only replace a dummy 'this' parm.
1380         PR c++/60628
1381         * decl.c (create_array_type_for_decl): Only check for auto once.
1383         PR c++/58636
1384         * call.c (build_list_conv): Don't try to build a list of references.
1386 2014-07-13  Edward Smith-Rowland  <3dw4rd@verizon.net>
1388         PR C++/60209 - Declaration of user-defined literal operator cause error
1389         * parser.c (cp_parser_operator): Fold treatment of strings
1390         and user-defined string literals.  Use the full string parser.
1391         (cp_parser_string_literal): Add flag to not look for literal operator.
1393 2014-07-11  Jason Merrill  <jason@redhat.com>
1395         PR c++/22434
1396         PR c++/61288
1397         * call.c (build_conditional_expr_1): Avoid reading freed memory.
1399 2014-07-11  Paolo Carlini  <paolo.carlini@oracle.com>
1401         PR c++/53159
1402         * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1403         into convflags.
1404         * decl.c (check_initializer): Don't call check_narrowing here,
1405         set LOOKUP_NO_NARROWING.
1406         * typeck2.c (digest_init_r): Likewise.
1408 2014-07-10  Jason Merrill  <jason@redhat.com>
1410         PR c++/61661
1411         * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1413         PR c++/61659
1414         PR c++/61687
1415         * decl2.c (mark_all_virtuals): New variable.
1416         (maybe_emit_vtables): Check it instead of flag_devirtualize.
1417         (cp_write_global_declarations): Set it and give helpful diagnostic
1418         if it introduces errors.
1419         * class.c (finish_struct_1): Check it.
1420         * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1422 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1424         PR c++/60686
1425         * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1426         outside class declaration, in friend declaration, and neither on
1427         constructor nor conversion operator.
1429 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1431         DR 1584
1432         PR c++/57466
1433         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1434         cv-qualifiers of function types.
1436 2014-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
1437             Paolo Carlini  <paolo.carlini@oracle.com>
1439         PR c++/59361
1440         * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1441         CPP_ELLIPSIS too.
1443 2014-07-07  Paolo Carlini  <paolo.carlini@oracle.com>
1445         * class.c (check_for_override): Wrap the 'final' and 'override'
1446         keywords in %< and %>.
1448 2014-07-06  Marek Polacek  <polacek@redhat.com>
1450         PR c/6940
1451         * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1452         * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1453         * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1454         function parameter.
1456 2014-07-02  Paolo Carlini  <paolo.carlini@oracle.com>
1458         * pt.c (convert_template_argument): Use inform instead of error in
1459         three places.
1461 2014-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
1463         PR c++/58781
1464         PR c++/60249
1465         PR c++/59867
1466         * parser.c (cp_parser_userdef_string_literal): Take a tree
1467         not a cp_token*.
1468         (cp_parser_string_literal): Don't hack the token stream.
1470 2014-06-30  Jason Merrill  <jason@redhat.com>
1472         PR c++/61659
1473         PR lto/53808
1474         * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1475         devirtualizing.
1476         * init.c (build_vtbl_address): Don't mark destructor.
1477         * class.c (finish_struct_1): Add all classes to keyed_classes
1478         if devirtualizing.
1480         PR c++/61647
1481         * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1483         PR c++/61566
1484         * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1486         * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1487         TYPE_BINFO or TYPE_LANG_SPECIFIC.
1488         * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1489         (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1490         * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1491         * pt.c (unify): Also check whether the argument is a PMF.
1493 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
1495         PR c++/54891
1496         * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1497         a '[' can also start a primary-expression.
1498         (cp_parser_cast_expression): Parse a cast-expression only tentatively
1499         when cp_parser_tokens_start_cast_expression returns -1.
1501 2014-06-30  Jason Merrill  <jason@redhat.com>
1503         PR c++/61539
1504         * pt.c (unify_one_argument): Type/expression mismatch just causes
1505         deduction failure.
1507         * semantics.c (simplify_aggr_init_expr): Remove remnants of
1508         2014-04-11 change.
1510 2014-06-30  Marek Polacek  <polacek@redhat.com>
1512         * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1513         function has no_sanitize_undefined attribute.
1514         * decl.c (compute_array_index_type): Don't instrument VLAs if the
1515         function has no_sanitize_undefined attribute.
1517 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
1519         PR middle-end/57541
1520         * cp-array-notation.c (expand_sec_reduce_builtin):
1521         Check that bultin argument is correct.
1522         * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1524 2014-06-28  Jonathan Wakely  <jwakely@redhat.com>
1526         DR 1579
1527         PR c++/58051
1528         * typeck.c (check_return_expr): Lookup as an rvalue even when the
1529         types aren't the same.
1531 2014-06-27  Jason Merrill  <jason@redhat.com>
1533         PR c++/61433
1534         * error.c (dump_template_bindings): Don't tsubst in a clone.
1536 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1538         PR c++/61614
1539         * semantics.c (finish_compound_literal): Revert r204228.
1541 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1543         * parser.c (cp_parser_compound_literal_p): New.
1544         (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1546 2014-06-26  Jason Merrill  <jason@redhat.com>
1548         * parser.c (cp_parser_for_init_statement): Change range-for error
1549         to pedwarn.
1551         N3994 Ranged-based for-loops: The Next Generation
1552         * parser.c (cp_lexer_nth_token_is): New.
1553         (cp_parser_for_init_statement): Allow "for (id : init)".
1555 2014-06-26  Teresa Johnson  <tejohnson@google.com>
1557         * class.c (dump_class_hierarchy): Use saved dump files.
1558         (dump_vtable): Ditto.
1559         (dump_vtt): Ditto.
1561 2014-06-26  Adam Butcher  <adam@jessamine.co.uk>
1563         PR c++/61537
1564         * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1565         parameter lists outside of function parameter scope.
1567 2014-06-25  Paolo Carlini  <paolo.carlini@oracle.com>
1569         DR 178
1570         PR c++/49132
1571         * typeck2.c (process_init_constructor_record): Do not complain about
1572         uninitialized const members, because within aggregate-initialization,
1573         members without explicit initializers are value-initialized.
1575 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
1577         * semantics.c (finish_omp_clauses): Make sure
1578         OMP_CLAUSE_LINEAR_STEP has correct type.
1580 2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
1582         * class.c (check_methods, create_vtable_ptr, determine_key_method,
1583         add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1584         FUNCTION_DECL check.
1585         * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1586         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1587         (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1588         (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1590 2014-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
1592         PR c++/33972
1593         * decl.c (grokdeclarator): Do not early check for operator-function-id
1594         as non-function.
1596 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
1598         * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1599         Adjust.
1601 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
1603         * parser.c (cp_parser_omp_for_loop): For
1604         #pragma omp parallel for simd move lastprivate clause from parallel
1605         to for rather than simd.
1607 2014-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
1609         DR 577
1610         PR c++/33101
1611         * decl.c (grokparms): Accept a single parameter of type 'void'.
1613 2014-06-20  Jason Merrill  <jason@redhat.com>
1615         PR c++/59296
1616         * call.c (add_function_candidate): Avoid special 'this' handling
1617         if we have a ref-qualifier.
1619         PR c++/61556
1620         * call.c (build_over_call): Call build_this in template path.
1622 2014-06-19  Jason Merrill  <jason@redhat.com>
1624         PR c++/59296
1625         * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1627 2014-06-18  Jason Merrill  <jason@redhat.com>
1629         PR c++/59296
1630         * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1631         ref-qualifier handling.
1633         PR c++/61507
1634         * pt.c (resolve_overloaded_unification): Preserve
1635         ARGUMENT_PACK_EXPLICIT_ARGS.
1637 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
1639         * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1640         argument.
1641         * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1643 2014-06-17  Jason Merrill  <jason@redhat.com>
1645         PR c++/60605
1646         * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1648 2014-06-15  Jason Merrill  <jason@redhat.com>
1650         PR c++/61488
1651         * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1653         PR c++/61500
1654         * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1656 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1658         * decl.c (grokvardecl): Fix pasto in previous patch.
1660 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1662         * decl.c (duplicate_decls): Use set_decl_tls_model.
1663         (grokdeclarator): Likewise.
1664         * semantics.c (finish_id_expression): Check TLS only for
1665         static variables.
1666         (finish_omp_threadprivate): Use decl_default_tls_model.
1667         * decl2.c (get_guard): Likewise.
1668         * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1670 2014-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1672         PR c++/33101
1673         * decl.c (grokparms): Improve error message about void parameters.
1674         * error.c (type_to_string): Fix aka cut off code.
1676 2014-06-12  Jason Merrill  <jason@redhat.com>
1678         * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1679         * cvt.c (type_promotes_to): Likewise.
1680         * mangle.c (write_type, write_expression): Likewise.
1681         (write_name, write_template_arg): Likewise.
1682         (mangle_decl): Make alias based on flag_abi_compat_version.
1683         Emit -Wabi warning here.
1684         (finish_mangling_internal): Not here.  Drop warn parm.
1685         (finish_mangling_get_identifier, finish_mangling): Adjust.
1686         (mangle_type_string, mangle_special_for_type): Adjust.
1687         (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1688         (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1689         (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1691         * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1692         * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1693         (layout_nonempty_base_or_field, end_of_class): Likewise.
1694         (layout_empty_base, build_base_field, layout_class_type): Likewise.
1695         (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1696         (layout_virtual_bases): Likewise.
1697         * decl.c (compute_array_index_type): Likewise.
1698         * mangle.c (write_mangled_name, write_prefix): Likewise.
1699         (write_template_prefix, write_integer_cst, write_expression): Likewise.
1700         (write_template_arg, write_array_type): Likewise.
1701         * method.c (lazily_declare_fn): Likewise.
1702         * rtti.c (get_pseudo_ti_index): Likewise.
1703         * typeck.c (comp_array_types): Likewise.
1705 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
1707         * vtable-class-hierarchy.c: Update handling for section names
1708         that are no longer trees.
1709         * decl.c (duplicate_decls): Likewise.
1711 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1713         PR c++/19200
1714         * parser.c (cp_parser_init_declarator): Actually pass friend_p
1715         to cp_parser_declarator.
1717 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1719         PR c++/60265
1720         * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1721         * name-lookup.c (validate_nonmember_using_decl): Adjust error
1722         message.
1724 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1726         PR c++/19200
1727         * parser.c (cp_parser_declarator): Add bool parameter.
1728         (cp_parser_direct_declarator): Likewise, use it.
1729         (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1730         (cp_parser_condition, cp_parser_explicit_instantiation,
1731         cp_parser_init_declarator, cp_parser_type_id_1,
1732         cp_parser_parameter_declaration, cp_parser_exception_declaration,
1733         cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1734         cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1735         Adjust.
1736         * decl.c (grokdeclarator): Fix handling of friend declared in
1737         namespace scope (g++.dg/parse/friend10.C).
1739 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
1741         * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1742         ->implicit_section.
1743         * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1744         (maybe_clone_body): Move symbol across comdat groups.
1745         * method.c (use_thunk): Copy implicit section flag.
1747 2014-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1749         PR c++/22556
1750         * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1752 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
1754         * method.c (use_thunk): Use set_decl_section_name.
1755         * optimize.c (maybe_clone_body): Use set_decl_section_name.
1756         * decl.c (duplicate_decls): Likewise.
1757         * vtable-class-hierarchy.c: Likewise.
1759 2014-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
1761         PR c++/60184
1762         * class.c (check_field_decls): In C++11 mode do not reject
1763         static data members and reference-type members in unions.
1765 2014-06-05  Jason Merrill  <jason@redhat.com>
1767         PR c++/43453
1768         * decl.c (check_initializer): Collapse a TREE_LIST here.
1769         * typeck2.c (store_init_value): Not here.
1771 2014-06-05  Richard Biener  <rguenther@suse.de>
1772             Paolo Carlini  <paolo.carlini@oracle.com>
1774         PR c++/56961
1775         * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1776         handling of empty classes.
1778 2014-06-04  Jason Merrill  <jason@redhat.com>
1780         * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1781         for noexcept and thread_local, too.
1783         PR c++/61343
1784         * decl.c (check_initializer): Maybe clear
1785         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1787 2014-06-05  Richard Biener  <rguenther@suse.de>
1789         PR c++/61004
1790         * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1791         warnings for accessing empty classes.
1793 2014-06-05  Marek Polacek  <polacek@redhat.com>
1795         PR c/49706
1796         * parser.c (cp_parser_binary_expression): Warn when logical not is
1797         used on the left hand side operand of a comparison.
1799 2014-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
1801         PR c++/43453
1802         * typeck.c (cp_build_modify_expr): Handle array of characters
1803         initialized by a string literal.
1804         * decl.c (check_initializer): Handle parenthesized string literal
1805         as initializer.
1806         * typeck2.c (store_init_value): Remove redundant check.
1808 2014-06-04  Jason Merrill  <jason@redhat.com>
1810         PR c++/51253
1811         PR c++/61382
1812         * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1813         * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1815 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
1817         PR c/58942
1818         * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1819         with a pointer.
1821 2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1823         DR 1423
1824         PR c++/52174
1825         * call.c (standard_conversion): Convert nullptr to bool only
1826         in case of direct-initialization.
1827         (convert_like_real): Provide informative error message.
1829 2014-06-03  Marek Polacek  <polacek@redhat.com>
1831         PR c/60439
1832         * semantics.c (finish_switch_cond): Warn if switch condition has
1833         boolean value.
1835 2014-06-03  Jason Merrill  <jason@redhat.com>
1837         PR c++/60992
1838         * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first.  Add a new
1839         variable to local_specializations.
1841         PR c++/60848
1842         * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1844 2014-06-02  Jason Merrill  <jason@redhat.com>
1846         PR c++/61046
1847         * decl.c (reshape_init_class): Handle un-folded
1848         constant-expressions.
1850         PR c++/61134
1851         * pt.c (pack_deducible_p): Handle canonicalization.
1853 2014-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1855         * pt.c (tsubst_function_type): Initialize arg_types.
1857 2014-06-02  Siva Chandra Reddy  <sivachandra@google.com>
1859         PR debug/57519
1860         * class.c (handle_using_decl): Pass the correct scope to
1861         cp_emit_debug_info_for_using.
1863 2014-06-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1865         PR c++/59483
1866         PR c++/61148
1867         * search.c (accessible_p): Use current_nonlambda_class_type.
1868         * semantics.c (check_accessibility_of_qualified_id): Likewise.
1870 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1872         * decl.c: Include builtins.h.
1873         * semantics.c: Likewise.
1875 2014-05-31  Paolo Carlini  <paolo.carlini@oracle.com>
1877         DR 1227
1878         PR c++/57543
1879         * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1880         * pt.c (tsubst_function_type): Inject the this parameter; do the
1881         substitutions in the order mandated by the DR.
1882         (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1883         * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1884         (static_fn_type): Copy it.
1885         * decl2.c (build_memfn_type, change_return_type,
1886         cp_reconstruct_complex_type): Likewise.
1887         * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1888         * tree.c (strip_typedefs): Likewise.
1889         * typeck.c (merge_types): Likewise.
1891 2014-05-30  Jason Merrill  <jason@redhat.com>
1893         PR c++/56947
1894         * pt.c (instantiate_decl): Check that defer_ok is not set for
1895         local class members.
1897         PR c++/60992
1898         * pt.c (tsubst_init): Split out from...
1899         (tsubst_expr) [DECL_EXPR]: Here.
1900         (tsubst_copy) [VAR_DECL]: Use it.
1901         * semantics.c (finish_id_expression): Return the decl for static/const.
1903 2014-05-28  Jason Merrill  <jason@redhat.com>
1905         PR c++/47202
1906         * decl.c (cxx_comdat_group): Return a decl.
1907         * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1909         * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1910         bound.
1912         PR c++/61242
1913         * call.c (build_aggr_conv): Ignore passed in flags.
1914         (build_array_conv, build_complex_conv): Likewise.
1916 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1918         * optimize.c (maybe_thunk_body): Use set_comdat_group.
1919         (maybe_clone_body): Likewise.
1920         * decl.c (duplicate_decls): Update code duplicating comdat group;
1921         do not copy symtab pointer; before freeing newdecl remove it
1922         from symtab.
1923         * decl2.c (constrain_visibility): Use set_comdat_group.
1925 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1927         * rtti.c: Include tm_p.h
1928         (emit_tinfo_decl): Force RTTI data to be aligned to required
1929         ABI alignment only.
1931 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1933         * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
1934         ignoring other target adjustments.
1936 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1938         * semantics.c (finish_omp_clauses): Remove duplicated variable
1939         initialization.
1941         * parser.c (cp_parser_omp_target): Return bool values.
1943 2014-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1945         PR c++/61088
1946         * lambda.c (add_capture): Enforce that capture by value requires
1947         complete type.
1948         * typeck2.c (cxx_incomplete_type_inform): Early return if
1949         TYPE_MAIN_DECL is null.
1951 2014-05-21  Jonathan Wakely  <jwakely@redhat.com>
1953         PR c/61271
1954         * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
1956 2014-05-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
1958         PR c++/61133
1959         * lambda.c (build_capture_proxy, add_capture): Treat normal
1960         captures and init-captures identically.
1962 2014-05-21  Mark Wielaard  <mjw@redhat.com>
1964         PR debug/16063
1965         * cp-lang.c (cxx_enum_underlying_base_type): New function.
1966         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
1968 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
1970         * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
1971         * cp-array-notation.c (replace_invariant_exprs): Likewise.
1972         (expand_array_notation): Handle VOID_CST.
1973         * error.c (dump_expr): Likewise.
1974         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1975         (cxx_pretty_printer::expression): Likewise.
1976         (pp_cxx_new_expression): Use void_node instead of void_zero_node.
1977         * decl.c (register_dtor_fn): Likewise.
1978         * init.c (build_raw_new_expr, build_new_1, build_vec_init)
1979         (build_delete, push_base_cleanups): Likewise.
1980         * mangle.c (write_expression): Likewise.
1981         * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
1982         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1983         (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
1984         * tree.c (cp_tree_equal): Likewise.
1985         (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
1986         instead of void_zero_node.
1987         * typeck.c (check_return_expr): Likewise.
1988         * typeck2.c (build_functional_cast): Likewise.
1990 2014-05-21  Igor Zamyatin  <igor.zamyatin@intel.com>
1992         PR c/60189
1993         * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
1994         from here to...
1995         (cp_parser_statement): ...here. Make sure only semicolon can go after
1996         Cilk_sync.
1998 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2000         PR c++/58753
2001         PR c++/58930
2002         PR c++/58704
2003         * typeck2.c (digest_nsdmi_init): New.
2004         * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2005         * init.c (get_nsdmi): Likewise.
2006         * cp-tree.h (digest_nsdmi_init): Declare.
2008 2014-05-20  Jason Merrill  <jason@redhat.com>
2010         * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2011         up a virtual function in a dummy object.
2013 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2015         PR c++/60373
2016         * decl.c (duplicate_decls): Replace pair of warning_at with
2017         warning_at + inform.
2018         (maybe_commonize_var): Likewise.
2020 2014-05-20  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
2022         PR bootstrap/61210
2023         * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2024         (tsubst_copy_and_build): Perform recursive substitutions in a
2025         deterministic order.
2027 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2029         PR c++/58664
2030         * typeck2.c (cxx_incomplete_type_inform): New.
2031         (cxx_incomplete_type_diagnostic): Use it.
2032         * decl.c (grokdeclarator): Check the element type of an
2033         incomplete array type; call the above.
2034         * cp-tree.h (cxx_incomplete_type_inform): Declare.
2036 2014-05-19  Jason Merrill  <jason@redhat.com>
2038         PR c++/58761
2039         * pt.c (tsubst_copy): Don't check at_function_scope_p.
2040         (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2042 2014-05-19  Paolo Carlini  <paolo.carlini@oracle.com>
2044         * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2045         * parser.c (cp_parser_enum_specifier): Likewise.
2047 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
2049         * class.c (sorted_fields_type_new): Adjust.
2050         * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2051         * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2052         * cp-tree.h: Remove usage of variable_size gty attribute.
2053         * decl.c (make_label_decl): Adjust.
2054         (check_goto): Likewise.
2055         (start_preparsed_function): Likewise.
2056         (save_function_data): Likewise.
2057         * lex.c (init_reswords): Likewise.
2058         (retrofit_lang_decl): Likewise.
2059         (cxx_dup_lang_specific_decl): Likewise.
2060         (copy_lang_type): Likewise.
2061         (cxx_make_type): Likewise.
2062         * name-lookup.c (binding_entry_make): Likewise.
2063         (binding_table_construct): Likewise.
2064         (binding_table_new): Likewise.
2065         (cxx_binding_make): Likewise.
2066         (pushdecl_maybe_friend_1): Likewise.
2067         (begin_scope): Likewise.
2068         (push_to_top_level): Likewise.
2069         * parser.c (cp_lexer_alloc): Likewise.
2070         (cp_lexer_new_from_tokens): Likewise.
2071         (cp_token_cache_new): Likewise.
2072         (cp_parser_context_new): Likewise.
2073         (cp_parser_new): Likewise.
2074         (cp_parser_nested_name_specifier_opt): Likewise.
2075         (cp_parser_template_id): Likewise.
2076         * pt.c (maybe_process_partial_specialization): Likewise.
2077         (register_specialization): Likewise.
2078         (add_pending_template): Likewise.
2079         (lookup_template_class_1): Likewise.
2080         (push_tinst_level): Likewise.
2081         * semantics.c (register_constexpr_fundef): Likewise.
2082         (cxx_eval_call_expression): Likewise.
2083         * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2085 2014-05-16  Paolo Carlini  <paolo.carlini@oracle.com>
2087         PR c++/51640
2088         * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2089         when cp_parser_lookup_name sets ambiguous_decls.
2091 2014-05-15  Jason Merrill  <jason@redhat.com>
2093         * call.c (print_conversion_rejection): Use loc consistently.
2095 2014-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
2097         * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2098         * call.c (convert_like_real, build_new_method_call_1): Use it.
2099         * decl2.c (grokfield): Likewise.
2100         * init.c (perform_member_init, build_aggr_init, expand_default_init,
2101         build_new_1): Likewise.
2102         * mangle.c (write_expression): Likewise.
2103         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2105 2014-05-14  Jason Merrill  <jason@redhat.com>
2107         PR c++/20332
2108         PR c++/21631
2109         * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2110         dropped cv-quals as a bad conversion.
2111         (convert_like_real) [ck_ref_bind]: Explain them.
2112         (compare_ics): Check badness before stripping reference
2113         bindings.  Handle comparing bad reference bindings.
2114         * typeck.c (comp_cv_qualification): Add overload that just takes
2115         integers.
2116         * cp-tree.h: Declare it.
2118         * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2119         (arg_conversion_rejection, bad_arg_conversion_rejection)
2120         (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2121         (add_function_candidate): Pass actual argument, rather than type, to
2122         bad_arg_conversion_rejection.
2123         (print_conversion_rejection): Explain what's wrong with the conversion.
2124         (print_z_candidates): Say "candidate:" before each candidate.
2125         (splice_viable): Be strict if we see a viable or template candidate.
2126         (build_user_type_conversion_1): Pass false to strict parameter.
2127         (perform_overload_resolution, build_conditional_expr_1): Likewise.
2128         (build_new_op_1, build_new_method_call_1): Likewise.
2129         (build_op_call_1): Pass true to strict parameter.
2131 2014-05-13  Jason Merrill  <jason@redhat.com>
2133         * call.c (print_error_for_call_failure): Say "no match" rather
2134         than "ambiguous" if there were no strict matches.
2135         (build_new_method_call_1): Likewise.
2137         PR c++/61151
2138         * semantics.c (is_this_parameter): Allow capture proxies too.
2140 2014-05-12  Jason Merrill  <jason@redhat.com>
2142         * call.c (maybe_print_user_conv_context): New.
2143         (convert_like_real): Use it.  Print call context for bad
2144         user-defined conversion.
2145         (build_over_call): Print call context for bad 'this' conversion.
2147         * call.c (convert_like_real): Use inform for identifying the
2148         declaration point.
2150 2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
2152         * cvt.c (cp_convert_to_pointer): Don't call error_at if
2153         complain & tf_error is false.
2155         * decl.c (make_unbound_class_template): Prefer inform for
2156         "declared here"-type message.
2158 2014-05-09  Momchil Velikov  <momchil.velikov@gmail.com>
2160         PR c++/60463
2161         PR c++/60755
2162         * lambda.c (lambda_expr_this_capture): Add new parameter
2163         add_capture_p controlling whether the functions will try to
2164         capture 'this' via the default capture.
2165         (maybe_resolve_dummy): Likewise.
2166         * cp-tree.h: Adjust prototypes.
2167         * call.c, semantics.c: Change callers of these functions.
2168         * call.c (build_new_method_call_1): Use the actual 'this' that
2169         would be potentially captured for the overload resolution, instead
2170         of the dummy object.
2172 2014-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
2174         * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2175         parameter.
2176         (convert_nontype_argument): Adjust calls.
2177         (coerce_template_parameter_pack): Add missing complain & tf_error
2178         check.
2180 2014-05-09  Jason Merrill  <jason@redhat.com>
2182         DR 587
2183         PR c++/51317
2184         * call.c (build_conditional_expr_1, conditional_conversion): Handle
2185         non-class lvalues and xvalues that differ only in cv-qualifiers.
2187         DR 5
2188         PR c++/60019
2189         * call.c (build_user_type_conversion_1): The copy-init temporary
2190         is cv-unqualified.
2192         PR c++/58714
2193         * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2195         PR c++/54348
2196         * call.c (build_conditional_expr_1): If overload resolution finds
2197         no match, just say "different types".
2199         PR c++/32019
2200         * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2202         PR c++/22434
2203         * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2204         if we didn't find a conversion.
2205         Don't accept a bad conversion too early.
2207 2014-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
2209         PR c++/13981
2210         * typeck.c (convert_for_assignment): Provide an inform for pointers
2211         to incomplete class types.
2213 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
2215         PR c++/61083
2216         * pt.c (convert_nontype_argument): Protect all the error calls
2217         with complain & tf_error.
2219 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
2221         PR c++/61080
2222         * pt.c (instantiate_decl): Avoid generating the body of a
2223         deleted function.
2225 2014-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
2227         PR c++/60999
2228         * pt.c (maybe_begin_member_template_processing): Use
2229         uses_template_parms.
2231 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2232             Mike Stump  <mikestump@comcast.net>
2233             Richard Sandiford  <rdsandiford@googlemail.com>
2235         * call.c: Include wide-int.h.
2236         (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2237         (convert_for_arg_passing): Likewise.
2238         * class.c: Include wide-int.h.
2239         (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2240         (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2241         (include_empty_classes): Likewise
2242         (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2243         * cvt.c: Include wide-int.h.
2244         (ignore_overflows): Use wide_int_to_tree.
2245         * decl.c: Include wide-int.h.
2246         (check_array_designated_initializer): Use wide-int interfaces.
2247         (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2248         (finish_enum_value_list): Use signop.
2249         (build_enumerator): Use wide-int interfaces.
2250         * init.c: Include wide-int.h.
2251         (build_new_1): Use wide-int interfaces.
2252         * mangle.c: Include wide-int.h.
2253         (write_integer_cst): Use wide-int interfaces.
2254         (write_array_type): Likewise.
2255         * tree.c: Include wide-int.h.
2256         (cp_tree_equal): Use tree_int_cst_equal.
2257         * typeck2.c: Include wide-int.h.
2258         (process_init_constructor_array): Use wide-int interfaces.
2260 2014-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
2262         PR c++/58582
2263         * decl.c (grokfndecl): Check duplicate_decls return value for
2264         error_mark_node.
2265         * pt.c (instantiate_decl): A deleted function is defined.
2267 2014-05-02  Jason Merrill  <jason@redhat.com>
2269         * decl2.c (vague_linkage_p): Local statics have vague linkage.
2271         PR c++/60992
2272         * lambda.c (lambda_capture_field_type): Wrap anything dependent
2273         other than 'this'.
2274         (add_capture): Check for VLA before calling it.
2275         * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2276         just the current one.  Make non-static.
2277         * cp-tree.h: Declare it.
2278         * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2279         the operand was static or constant.
2281 2014-05-02  Marek Polacek  <polacek@redhat.com>
2283         * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2284         warning_at calls.
2286 2014-05-01  Marek Polacek  <polacek@redhat.com>
2288         PR c/43395
2289         * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2290         between label and variable when warning about returning local address.
2292 2014-04-30  Jason Merrill  <jason@redhat.com>
2294         PR c++/60980
2295         * init.c (build_value_init): Don't try to call an array constructor.
2297         PR c++/60951
2298         * typeck2.c (massage_init_elt): Use maybe_constant_init.
2300 2014-04-30  Marek Polacek  <polacek@redhat.com>
2302         * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2303         even when SANITIZE_FLOAT_DIVIDE is on.  Set doing_div_or_mod even
2304         for non-integer types.
2306 2014-04-29  Jason Merrill  <jason@redhat.com>
2308         DR 1351
2309         Represent the unevaluated exception specification of an implicitly
2310         declared or deleted function with a simple placeholder, not a list
2311         of functions.
2312         * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2313         * except.c (unevaluated_noexcept_spec): New.
2314         * class.c (deduce_noexcept_on_destructor): Use it.
2315         * decl.c (check_redeclaration_exception_specification): Call
2316         maybe_instantiate_noexcept.
2317         (duplicate_decls): Call it before merge_types.
2318         (start_preparsed_function): Call maybe_instantiate_noexcept.
2319         * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2320         * init.c (get_nsdmi): Factor out of perform_member_init.
2321         * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2322         (walk_field_subobs): Consider NSDMI for EH spec.
2323         (get_defaulted_eh_spec): New.
2324         (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2325         (defaulted_late_check): Defer EH checking in non-template classes.
2326         (after_nsdmi_defaulted_late_checks): New.
2327         * parser.c (cp_parser_class_specifier_1): Use it.
2328         (unparsed_classes): New macro.
2329         * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2330         * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2331         Remove list-of-functions handling.
2332         * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2333         handling and FN parameter.
2334         * typeck.c (merge_types): Adjust.
2336 2014-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
2338         PR c++/59120
2339         * parser.c (cp_parser_alias_declaration): Check return value of
2340         cp_parser_require.
2342 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
2344         * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2345         atomic-clause, allow comma in between atomic-clause and
2346         seq_cst.
2348 2014-04-24  Marc Glisse  <marc.glisse@inria.fr>
2350         PR libstdc++/43622
2351         * rtti.c (emit_support_tinfos): Do not iterate on
2352         registered_builtin_types (partial revert).
2354 2014-04-23 Dinar Temirbulatov  <dtemirbulatov@gmail.com>
2356         PR c++/57958
2357         * semantics.c (apply_deduced_return_type): Complete non-void type
2358         before estimating whether the type is aggregate.
2360 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
2362         PR libstdc++/43622
2363         * rtti.c (emit_support_tinfo_1): New function, extracted from
2364         emit_support_tinfos.
2365         (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2367 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
2369         PR c/59073
2370         * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2371         fails, don't set OM_PARALLEL_COMBINED and return NULL.
2373 2014-04-18  Jason Merrill  <jason@redhat.com>
2375         DR 1571
2376         * call.c (reference_binding): Recurse on user-defined conversion.
2378         PR c++/60872
2379         * call.c (standard_conversion): Don't try to apply restrict to void.
2381 2014-04-16  Marc Glisse  <marc.glisse@inria.fr>
2383         * decl.c (reshape_init_r): Handle a single element of vector type.
2385 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
2387         PR c++/60765
2388         * decl2.c (cplus_decl_attributes): Handle
2389         pointer-to-member-function declarations.
2391 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
2393         PR c++/60764
2394         * call.c (build_user_type_coversion): Use build_dummy_object
2395         to create the placeholder object for a constructor method call.
2396         (build_special_member_call): Likewise.
2397         (build_over_call): Check for the placeholder object with
2398         is_dummy_object.
2399         (build_new_method_call_1): Likewise.  Don't attempt to resolve
2400         a dummy object for a constructor method call.
2402 2014-04-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
2404         PR c++/59295
2405         * friend.c (add_friend, make_friend_class): Move repeated friend
2406         warning under Wredundant_decls.
2408 2014-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
2410         * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2411         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2412         (do_class_using_decl): Likewise.
2413         * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2415 2014-04-15  Jakub Jelinek  <jakub@redhat.com>
2417         PR plugins/59335
2418         * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2420 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2422         * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2424 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2426         * pt.c (mark_template_parm): Use template_parm_level_and_index.
2428 2014-04-11  Jason Merrill  <jason@redhat.com>
2430         * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2431         * parser.c: Adjust.
2432         (cp_lexer_get_preprocessor_token): Always clear it.
2433         (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2435         DR 1467
2436         PR c++/51747
2437         * decl.c (reshape_init_r): Handle a single element of class type.
2439         DR 1338
2440         * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2441         built-in operator new.
2443 2014-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2445         PR c++/58600
2446         * name-lookup.c (parse_using_directive): Return early if the
2447         attribs argument is error_mark_node; use get_attribute_name.
2449 2014-04-11  Jason Merrill  <jason@redhat.com>
2451         DR 1030
2452         PR c++/51253
2453         * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2454         * call.c (struct z_candidate): Add flags field.
2455         (add_candidate): Add flags parm.
2456         (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2457         (add_template_candidate_real): Pass it.
2458         (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2459         * tree.c (build_aggr_init_expr): Copy it.
2460         * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2462 2014-04-10  Richard Biener  <rguenther@suse.de>
2463             Jakub Jelinek  <jakub@redhat.com>
2465         PR ipa/60761
2466         * error.c (dump_decl) <case FUNCTION_DECL>: If
2467         DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2468         recurse on DECL_ABSTRACT_ORIGIN instead of printing
2469         <built-in>.
2471 2014-04-09  Fabien Chêne  <fabien@gcc.gnu.org>
2473         * pt.c (check_template_variable): Check for the return of pedwarn
2474         before emitting a note.
2475         * parser.c (cp_parser_lambda_introducer): Likewise.
2477 2014-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
2479         PR c++/59115
2480         * pt.c (process_template_parm): For an invalid non-type parameter
2481         only set TREE_TYPE to error_mark_node.
2482         (push_inline_template_parms_recursive, comp_template_parms,
2483         redeclare_class_template, coerce_template_template_parm,
2484         coerce_template_template_parms, unify): Use error_operand_p.
2486 2014-04-08  Nathan Sidwell  <nathan@codesourcery.com>
2488         * class.c (check_bases_and_members): Warn about non-virtual dtors
2489         in public bases only.  Check warn_ecpp before complaining about
2490         non-polymorphic bases.
2492 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2494         * decl.c (duplicate_decls): Check for the return of warning_at
2495         before emitting a note.
2496         (warn_misplaced_attr_for_class_type): Likewise.
2497         (check_tag_decl): Likewise.
2499 2014-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
2501         PR c++/58207
2502         * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2504 2014-04-04  Patrick Palka  <patrick@parcs.ath.cx>
2506         PR c++/44613
2507         * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2508         * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2509         instantiating a variable-sized type.
2511         PR c++/21113
2512         * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2514 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2516         * class.c (find_abi_tags_r): Check for the return of warning
2517         before emitting a note.
2518         (one_inherited_ctor): Likewise.
2520 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2522         * decl.c (duplicate_decls): Check for the return of permerror
2523         before emitting a note.
2525 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
2527         * class.c (accessible_nvdtor_p): New.
2528         (check_bases): Don't check base destructor here ...
2529         (check_bases_and_members): ... check them here.  Trigger on
2530         Wnon-virtual-dtor flag.
2531         (finish_struct_1): Use accessible_nvdtor_p.
2533 2014-04-01  Jason Merrill  <jason@redhat.com>
2535         * pt.c (process_partial_specialization): Say "not deducible"
2536         rather than "not used".  Use inform.
2538         PR c++/60374
2539         * pt.c (coerce_template_parms): Check that the pack expansion
2540         pattern works with the first matching parameter.
2542 2014-04-01  Fabien Chêne  <fabien@gcc.gnu.org>
2544         * init.c (perform_member_init): Homogenize uninitialized
2545         diagnostics.
2547 2014-04-01  Jason Merrill  <jason@redhat.com>
2549         PR c++/60708
2550         * call.c (build_array_conv): Call complete_type.
2552         PR c++/60713
2553         * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2554         (picflag_from_initializer): Return it.
2555         (process_init_constructor): Handle it.
2557         PR c++/60642
2558         * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2559         * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2560         * pt.c (get_template_info): Handle NAMESPACE_DECL.
2561         (most_general_template): Handle more kinds of template.
2562         * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2563         instantiations and specializations.
2565 2014-03-31  Patrick Palka  <patrick@parcs.ath.cx>
2567         PR c++/44859
2568         * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2569         COMPONENT_REFs and ARRAY_REFs sooner.
2571 2014-03-29  Adam Butcher  <adam@jessamine.co.uk>
2573         PR c++/60626
2574         * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2575         usage in non-functions with pushed scope.
2577 2014-03-28  Adam Butcher  <adam@jessamine.co.uk>
2579         PR c++/60573
2580         * name-lookup.h (cp_binding_level): New transient field defining_class_p
2581         to indicate whether a scope is in the process of defining a class.
2582         * semantics.c (begin_class_definition): Set defining_class_p.
2583         * name-lookup.c (leave_scope): Reset defining_class_p.
2584         * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2585         defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2586         unwinding to class-defining scope to handle the erroneous definition of
2587         a generic function of an arbitrarily nested class within an enclosing
2588         class.
2590 2014-03-26  Fabien Chêne  <fabien@gcc.gnu.org>
2592         PR c++/52369
2593         * method.c (walk_field_subobs): Improve the diagnostic
2594         locations for both REFERENCE_TYPEs and non-static const members.
2595         * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2596         instead of %qD to be consistent with the c++11 diagnostic.
2598 2014-03-25  Jason Merrill  <jason@redhat.com>
2600         PR c++/60566
2601         PR c++/58678
2602         * class.c (build_vtbl_initializer): Handle abstract dtors here.
2603         * search.c (get_pure_virtuals): Not here.
2605         PR c++/60375
2606         * parser.c (cp_parser_lambda_expression): Don't parse the body of
2607         a lambda in unevaluated context.
2609         PR c++/60628
2610         * decl.c (create_array_type_for_decl): Complain about array of auto.
2612 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
2614         PR c++/60331
2615         * semantics.c (potential_constant_expression_1): Handle
2616         DECL_EXPR.
2618 2014-03-24  Adam Butcher  <adam@jessamine.co.uk>
2620         PR c++/60627
2621         * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2622         introducing an implicit function template parameter within an explicit
2623         instantiation.
2625 2014-03-22  Jason Merrill  <jason@redhat.com>
2627         PR c++/60574
2628         * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2629         to error.
2631 2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
2633         PR c++/60384
2634         * name-lookup.c (push_class_level_binding_1): Check identifier_p
2635         on the name argument.
2637 2014-03-20  Jakub Jelinek  <jakub@redhat.com>
2639         PR c++/60572
2640         * init.c (build_zero_init_1): Ignore fields with error_mark_node
2641         type.
2643 2014-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
2645         PR c++/51474
2646         * call.c (build_new_method_call_1): Handle pure virtuals called by
2647         NSDMIs too.
2649 2014-03-17  Adam Butcher  <adam@jessamine.co.uk>
2651         PR c++/60390
2652         * parser.c (cp_parser_member_declaration): Don't allow
2653         finish_fully_implicit_template to consider friend declarations to be
2654         class member templates.
2655         (synthesize_implicit_template_parm): Handling winding back through class
2656         scope to the class being defined in order to inject a template argument
2657         list.
2659         PR c++/60391
2660         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2661         function scope as per cp_parser_skip_to_end_of_statement.
2663 2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
2665         PR c++/59571
2666         * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2668 2014-03-14  Jason Merrill  <jason@redhat.com>
2670         PR c++/60532
2671         PR c++/58678
2672         * search.c (get_pure_virtuals): Handle abstract dtor here.
2673         (dfs_get_pure_virtuals): Not here.
2675         PR c++/58678
2676         * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2677         abstract class as pure.
2679 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2681         PR c++/60383
2682         * pt.c (maybe_process_partial_specialization): Check return value
2683         of check_specialization_namespace.
2685 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2687         PR c++/60254
2688         * semantics.c (finish_static_assert): Call cxx_constant_value only
2689         if require_potential_rvalue_constant_expression returns true.
2691 2014-03-11  Paolo Carlini  <paolo.carlini@oracle.com>
2693         PR c++/60389
2694         * method.c (get_inherited_ctor): New.
2695         * cp-tree.h (get_inherited_ctor): Declare it.
2696         * semantics.c (is_valid_constexpr_fn): Use it.
2698 2014-03-10  Jason Merrill  <jason@redhat.com>
2700         PR c++/60367
2701         * call.c (convert_default_arg): Remove special handling for
2702         CONSTRUCTOR.
2704         PR c++/53492
2705         * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2706         when deciding whether to call push_template_decl for a member class.
2707         * pt.c (push_template_decl_real): Return after wrong levels error.
2709 2014-03-08  Adam Butcher  <adam@jessamine.co.uk>
2711         PR c++/60033
2712         * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2713         lambda, remove the lambda's own template argument list prior to fetching
2714         the specialization.
2716         PR c++/60393
2717         * parser.c (cp_parser_parameter_declaration_clause): Move generic
2718         function template unwinding on error into a more general location, ...
2719         (cp_parser_skip_to_end_of_statement): ... here.
2721 2014-03-07  Jason Merrill  <jason@redhat.com>
2723         * Make-lang.in (check_g++_parallelize): Split dg.exp.
2725         * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2726         we're in a trailing return type.
2728         * typeck.c (comp_template_parms_position): 'auto' and
2729         'decltype(auto)' are different from real template parms.
2731         * parser.c (cp_parser_using_declaration): Consume the semicolon
2732         after bare parameter pack error.
2734         * cp-tree.h (REF_PARENTHESIZED_P): New.
2735         * semantics.c (force_paren_expr): Set it.
2736         * pt.c (do_auto_deduction): Check it.
2737         (tsubst) [COMPONENT_REF]: Copy it.
2738         * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2740         * decl.c (create_array_type_for_decl): Only warn about invalid
2741         C++1y VLA if flag_iso or warn_vla>0.
2742         (grokdeclarator): Likewise.
2743         * pt.c (tsubst): Likewise.
2744         * semantics.c (finish_decltype_type): Likewise.
2745         * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2746         (cp_build_addr_expr_1): Likewise.
2747         * init.c (build_new_1): Improve diagnostics.
2749 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2751         PR c++/58609
2752         * decl.c (check_initializer): Return NULL_TREE after error;
2753         consistently use inform.
2755 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2757         * decl.c (check_initializer): Remove dead code.
2759 2014-03-06  Marek Polacek  <polacek@redhat.com>
2761         PR c/60197
2762         * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2763         of checking tree code.
2765 2014-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2767         * parser.c (cp_lexer_set_source_position): New.
2768         (cp_parser_mem_initializer): Use it.
2769         (cp_parser_postfix_open_square_expression): Likewise.
2770         (cp_parser_parenthesized_expression_list): Likewise.
2771         (cp_parser_new_initializer): Likewise.
2772         (cp_parser_jump_statement): Likewise.
2773         (cp_parser_initializer): Likewise.
2774         (cp_parser_functional_cast): Likewise.
2776 2014-03-05  Jason Merrill  <jason@redhat.com>
2778         PR c++/60409
2779         * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2780         dependent expression.
2782         PR c++/60361
2783         * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2784         if re-parsing might succeed.
2785         * semantics.c (finish_id_expression): Use of a parameter outside
2786         the function body is a parse error.
2788         * parser.c (cp_parser_mem_initializer): Set input_location
2789         properly for init-list warning.
2790         (cp_parser_postfix_open_square_expression): Likewise.
2791         (cp_parser_parenthesized_expression_list): Likewise.
2792         (cp_parser_new_initializer): Likewise.
2793         (cp_parser_jump_statement): Likewise.
2794         (cp_parser_initializer): Likewise.
2795         (cp_parser_functional_cast): Likewise.
2797 2014-03-04  Jason Merrill  <jason@redhat.com>
2799         PR c++/60417
2800         * typeck2.c (process_init_constructor_record): Set
2801         CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2803         PR c++/60415
2804         PR c++/54359
2805         * parser.c (cp_parser_direct_declarator): Set declarator to
2806         cp_error_declarator on invalid qualified-id.
2808 2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
2810         PR c++/60376
2811         * parser.c (cp_parser_using_declaration): Early return when
2812         cp_parser_nested_name_specifier errors out.
2814 2014-03-01  Adam Butcher  <adam@jessamine.co.uk>
2816         PR c++/60377
2817         * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2818         function scope on parse error in function parameter list.
2820 2014-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
2822         * method.c (implicitly_declare_fn): Remove redundant
2823         DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2824         * semantics.c (is_instantiation_of_constexpr): Likewise.
2825         * error.c (dump_function_decl): Likewise.
2827 2014-03-01  Jason Merrill  <jason@redhat.com>
2829         PR c++/60379
2830         * semantics.c (begin_maybe_infinite_loop): Use
2831         fold_non_dependent_expr_sfinae.
2833 2014-02-28  Jason Merrill  <jason@redhat.com>
2835         PR c++/58845
2836         * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2838 2014-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
2840         PR c++/58610
2841         * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2842         * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2843         * lambda.c (maybe_add_lambda_conv_op): Likewise.
2845 2014-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
2847         PR c++/60253
2848         * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2849         error_at.
2851 2014-02-27  Jason Merrill  <jason@redhat.com>
2853         PR c++/60353
2854         PR c++/55877
2855         * decl2.c (tentative_decl_linkage): Don't mess with functions that
2856         are not yet defined.
2858 2014-02-26  Jason Merrill  <jason@redhat.com>
2860         PR c++/60347
2861         PR lto/53808
2862         * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2863         * init.c (build_vtbl_address): Do it here.
2865         PR c++/59231
2866         PR c++/11586
2867         PR c++/14710
2868         PR c++/57132
2869         * pt.c (struct warning_sentinel): New.
2870         (tsubst_copy_and_build): Use it instead of
2871         c_inhibit_evaluation_warnings.
2872         * typeck.c (maybe_warn_about_useless_cast): Remove
2873         c_inhibit_evaluation_warnings check.
2875         PR c++/54440
2876         * pt.c (get_template_parm_index): New.
2877         (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2878         (process_template_parm): Allow bare packs in template template
2879         parm template parms.
2880         (coerce_template_parameter_pack): Handle fixed template template
2881         parm packs and fixed packs not at the end of the parm list.
2882         (coerce_template_parms): Handle template parm packs not at the end
2883         of the parm list.
2884         (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2886         PR c++/60182
2887         * pt.c (unify): Ignore alias templates when deducing a template
2888         template parameter.
2890         PR c++/60345
2891         Revert:
2892         DR 1571
2893         * call.c (reference_binding): Recurse on user-defined conversion.
2894         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2896 2014-02-25  Jason Merrill  <jason@redhat.com>
2898         DR 1571
2899         * call.c (reference_binding): Recurse on user-defined conversion.
2900         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2902         * call.c (print_conversion_rejection): Handle n_arg of -2.
2903         (build_user_type_conversion_1): Pass it.
2905         PR c++/55877
2906         * decl2.c (no_linkage_error): Handle C++98 semantics.
2907         (reset_type_linkage): Move from decl.c.
2908         (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2909         (bt_reset_linkage_2, reset_decl_linkage): New.
2910         (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2911         (cp_write_global_declarations): Move condition into no_linkage_error.
2912         * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2913         * semantics.c (expand_or_defer_fn_1): Factor out
2914         tentative_decl_linkage.
2915         * cp-tree.h: Adjust.
2917         * decl2.c (finish_static_data_member_decl): Diagnose static data
2918         member in unnamed class.
2919         * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2921         PR lto/53808
2922         * class.c (clone_function_decl): Call note_vague_linkage_fn for
2923         defaulted virtual dtor.
2925         DR 1286
2926         PR c++/60328
2927         * pt.c (get_underlying_template): Fix equivalence calculation.
2929 2014-02-25  Adam Butcher  <adam@jessamine.co.uk>
2931         PR c++/60311
2932         * parser.c (function_being_declared_is_template_p): Return false when
2933         processing a template parameter list.
2934         (cp_parser_parameter_declaration_clause): Don't set
2935         auto_is_implicit_function_template_parm_p when processing a
2936         template parameter list.
2938         * parser.c (synthesize_implicit_template_parm): Inject new template
2939         argument list appropriately when a generic member function
2940         of a class template is declared out-of-line.
2942         PR c++/60065
2943         * parser.c (cp_parser_direct_declarator): Don't save and
2944         restore num_template_parameter_lists around call to
2945         cp_parser_parameter_declaration_list.
2946         (function_being_declared_is_template_p): New predicate.
2947         (cp_parser_parameter_declaration_list): Use
2948         function_being_declared_is_template_p as predicate for
2949         inspecting current function template parameter list length
2950         rather than num_template_parameter_lists.
2952 2014-02-24  Jason Merrill  <jason@redhat.com>
2954         PR c++/60146
2955         * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
2956         DECL_EXPR initialize a non-class iterator.
2958         PR c++/60312
2959         * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
2961 2014-02-21  Jason Merrill  <jason@redhat.com>
2963         PR c++/58170
2964         * parser.c (cp_parser_type_name): Always check dependency.
2965         (cp_parser_type_specifier_seq): Call
2966         cp_parser_parse_and_diagnose_invalid_type_name.
2968         PR c++/60108
2969         * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
2971         PR c++/60185
2972         * parser.c (cp_parser_default_argument): Clear
2973         current_class_ptr/current_class_ref like tsubst_default_argument.
2975         PR c++/60252
2976         * lambda.c (maybe_resolve_dummy): Check lambda_function rather
2977         than current_binding_level.
2979         PR c++/60186
2980         * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
2982         PR c++/60187
2983         * parser.c (cp_parser_enum_specifier): Call
2984         check_for_bare_parameter_packs.
2986         PR c++/59347
2987         * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
2988         erroneous typedef.
2990         PR c++/60241
2991         * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
2992         of the partial instantiation, not the most general template.
2993         (maybe_process_partial_specialization): Reassign everything on
2994         that list.
2996         PR c++/60216
2997         * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
2998         (check_explicit_specialization): Don't clone.
3000         PR c++/60219
3001         * pt.c (coerce_template_parms): Bail if argument packing fails.
3003         PR c++/60224
3004         * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3005         Don't get confused by a CONSTRUCTOR that already has a type.
3007         PR c++/60227
3008         * call.c (build_array_conv): Don't crash on VLA.
3010         PR c++/60248
3011         * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3013         PR c++/60252
3014         * lambda.c (maybe_resolve_dummy): Don't try to capture this
3015         in declaration context.
3017         DR 1591
3018         PR c++/60051
3019         * pt.c (unify): Only unify if deducible.  Handle 0-length list.
3021         PR c++/60250
3022         * parser.c (cp_parser_direct_declarator): Don't wrap a
3023         type-dependent expression in a NOP_EXPR.
3025         PR c++/60251
3026         * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3028         PR c++/60167
3029         PR c++/60222
3030         PR c++/58606
3031         * parser.c (cp_parser_template_argument): Restore dereference.
3032         * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3033         (process_partial_specialization): Handle deref.
3034         (unify): Likewise.
3036 2014-02-21  Adam Butcher  <adam@jessamine.co.uk>
3038         PR c++/60052
3039         PR c++/60053
3040         * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3041         implicit_template_scope upon leaving an out-of-line generic member
3042         function definition.
3044 2014-02-20  Kai Tietz  <ktietz@redhat.com>
3046         PR c++/58873
3047         * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3048         valued type argument as error_mark_node.
3050         PR c++/58835
3051         * semantics.c (finish_fname): Handle error_mark_node.
3053 2014-02-19  Jason Merrill  <jason@redhat.com>
3055         PR c++/60046
3056         * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3057         spec from template context.
3059 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
3061         PR debug/56563
3062         * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3063         FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3065         PR c++/60267
3066         * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3068 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
3070         PR c++/60225
3071         * semantics.c (ensure_literal_type_for_constexpr_object): Use
3072         strip_array_types.
3074 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
3076         PR c++/60215
3077         * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3078         During error recovery allow_non_constant may be false.
3080 2014-02-18  Adam Butcher  <adam@jessamine.co.uk>
3082         PR c++/60190
3083         * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3084         scope whenever a template parameter list has been started, independent
3085         of whether the function call operator was well-formed or not.
3087         PR c++/60064
3088         * parser.c (cp_parser_member_declaration): Pop fully implicit template
3089         scope for generic friend declarations as well as for non-friends.
3091 2014-02-12  Paolo Carlini  <paolo.carlini@oracle.com>
3093         PR c++/60047
3094         * method.c (implicitly_declare_fn): A constructor of a class with
3095         virtual base classes isn't constexpr (7.1.5p4).
3097 2014-02-05  Jan Hubicka  <hubicka@ucw.cz
3099         * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3101 2014-02-05  Jakub Jelinek  <jakub@redhat.com>
3103         PR c++/58703
3104         * parser.c (cp_parser_omp_declare_reduction): Save and free
3105         declarator_obstack.
3107 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
3109         PR c++/53017
3110         PR c++/59211
3111         * tree.c (handle_init_priority_attribute): Call default_conversion on
3112         the attribute argument.
3114 2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
3116         PR c++/58871
3117         * method.c (synthesized_method_walk): If vbases is non-null but
3118         is_empty is true, likewise don't worry about the virtual bases.
3120 2014-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
3122         PR c++/51219
3123         * typeck2.c (process_init_constructor_record): Just skip unnamed
3124         bit-fields.
3126 2014-01-31  Jason Merrill  <jason@redhat.com>
3128         PR c++/59469
3129         * pt.c (mark_decl_instantiated): Call mark_needed.
3131         PR c++/58672
3132         * decl2.c (handle_tls_init): Handle null init fn.
3134         PR c++/55800
3135         * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3137 2014-01-31  Paolo Carlini  <paolo.carlini@oracle.com>
3139         PR c++/59082
3140         * class.c (build_vfield_ref): Early return error_mark_node if
3141         TYPE_VFIELD (type) is null.
3142         (build_base_path): Check return value of build_vfield_ref.
3144 2014-01-31  Jason Merrill  <jason@redhat.com>
3146         PR c++/59646
3147         * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3148         [ck_list]: Check for error_mark_node.
3149         (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3151         PR c++/57043
3152         * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3153         during partial ordering.
3155 2014-01-31  Marek Polacek  <polacek@redhat.com>
3157         PR c/59963
3158         * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3160 2014-01-30  Jason Merrill  <jason@redhat.com>
3162         PR c++/57899
3163         * cp-tree.h (struct saved_scope): Add x_local_specializations.
3164         (local_specializations): New macro.
3165         * pt.c (local_specializations): Remove variable.
3167 2014-01-30  Richard Sandiford  <rdsandiford@googlemail.com>
3169         PR c++/58708
3170         * parser.c (make_string_pack): Use double_int::from_buffer.
3172 2014-01-30  Marek Polacek  <polacek@redhat.com>
3174         PR c/59940
3175         * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3176         input_location.
3177         * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3178         with input_location.
3179         * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3180         loc parameter.
3182 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3184         PR c++/58843
3185         * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3187 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3189         PR c++/58649
3190         * pt.c (lookup_template_class_1): Check start_enum return value
3191         for error_mark_node.
3193 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3195         * decl.c (duplicate_decls, typename_hash, typename_compare):
3196         Use TYPE_IDENTIFIER.
3197         * error.c (dump_type): Likewise.
3198         * mangle.c (dump_substitution_candidates): Likewise.
3200 2014-01-30  Jason Merrill  <jason@redhat.com>
3202         PR c++/59633
3203         * decl2.c (attributes_naming_typedef_ok): New.
3204         * cp-tree.h: Declare it.
3205         * decl.c (grokdeclarator): Check it.
3206         * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3208 2014-01-29  Jason Merrill  <jason@redhat.com>
3210         PR c++/59707
3211         * call.c (add_builtin_candidate): Catch dependent types.
3213         PR c++/59989
3214         * pt.c (expand_template_argument_pack): Correct
3215         non_default_args_count calculation.
3217         PR c++/58466
3218         * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3220         PR c++/59956
3221         * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3222         have a friend template in a class template.
3223         * pt.c (tsubst_friend_function): Look through it.
3224         (push_template_decl_real): A friend member template is
3225         primary.
3227 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3229         PR c++/58846
3230         * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3231         == error_mark_node.
3233 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3235         PR c++/58674
3236         * pt.c (instantiate_template_1): Check for error_mark_node the second
3237         argument too.
3239 2014-01-29  Jason Merrill  <jason@redhat.com>
3241         PR c++/59916
3242         * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3243         cdtor_returns_this case.
3245         PR c++/59315
3246         * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3248 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3250         PR c++/58702
3251         * semantics.c (finish_omp_reduction_clause): Check type for
3252         error_mark_node.
3254 2014-01-28  Jason Merrill  <jason@redhat.com>
3256         PR c++/59791
3257         * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3258         (tsubst_copy): Use it if lookup fails.
3260         PR c++/59818
3261         * pt.c (tsubst_function_type): Make sure we keep the same function
3262         quals.
3264         PR c++/58701
3265         * semantics.c (build_anon_member_initialization): Stop walking
3266         when we run out of COMPONENT_REFs.
3268         PR c++/58632
3269         * decl.c (lookup_and_check_tag): Ignore template parameters if
3270         scope == ts_current.
3271         * pt.c (check_template_shadow): Don't complain about the injected
3272         class name.
3274         * decl.c (duplicate_decls): Tweak.
3276         PR c++/53756
3277         * mangle.c (write_unqualified_name): Handle operator auto.
3279 2014-01-27  Jason Merrill  <jason@redhat.com>
3281         PR c++/59823
3282         Core DR 1138
3283         * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3284         list-initialization.  A conversion to rvalue ref that involves
3285         an lvalue-rvalue conversion is bad.
3286         (convert_like_real): Give helpful error message.
3288         PR c++/54652
3289         * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3291         PR c++/58504
3292         * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3293         types.
3295         PR c++/58606
3296         * pt.c (template_parm_to_arg): Call convert_from_reference.
3297         (tsubst_template_arg): Don't strip reference refs.
3299         PR c++/58639
3300         * call.c (build_aggr_conv): Reject value-initialization of reference.
3302         PR c++/58812
3303         PR c++/58651
3304         * call.c (convert_like_real): Give helpful error about excess braces
3305         for ck_rvalue of scalar type.
3307         Core DR 1288
3308         * call.c (reference_binding): Only elide braces if the single
3309         element is reference-related.
3311         PR c++/58814
3312         * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3313         stabilizing.
3315         PR c++/58837
3316         * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3317         FUNCTION_DECL.
3319         PR c++/59097
3320         * decl.c (compute_array_index_type): Don't call
3321         maybe_constant_value for a non-integral expression.
3323 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3325         * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3326         flag_cilkplus.
3327         * cp-gimplify.c (cp_genericize): Likewise.
3328         * decl.c (grokfndecl): Likewise.
3329         * parser.c (cp_parser_postfix_expression): Likewise.
3330         (cp_parser_postfix_open_square_expression): Likewise.
3331         (cp_parser_direct_declarator): Likewise.
3332         (is_cilkplus_vector_p): Likewise.
3333         (cp_parser_omp_clause_name): Likewise.
3334         (cp_parser_omp_all_clauses): Likewise.
3335         * pt.c (apply_late_template_attributes): Likewise.
3336         * typeck.c (cp_build_array_ref): Likewise.
3337         (cp_build_compound_expr): Likewise.
3338         (check_return_expr): Likewise.
3340 2014-01-24  Jason Merrill  <jason@redhat.com>
3342         PR c++/58550
3343         * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3344         c++11 into error.
3346         PR c++/59886
3347         PR c++/59659
3348         * typeck2.c (process_init_constructor_array): Don't create
3349         RANGE_EXPR yet.
3351 2014-01-24  Jakub Jelinek  <jakub@redhat.com>
3353         * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3354         handling for RANGE_ARRAY case.
3356 2014-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
3358         PR c++/57524
3359         * name-lookup.c (push_using_directive): Use timevar_cond_start.
3361 2014-01-23  Marek Polacek  <polacek@redhat.com>
3363         PR c/59846
3364         * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3366 2014-01-23  Marek Polacek  <polacek@redhat.com>
3368         PR c/58346
3369         * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3370         an empty aggregate.
3372 2014-01-23  Jason Merrill  <jason@redhat.com>
3374         PR c++/55189
3375         * cp-tree.h (struct language_function): Add infinite_loop and
3376         infinite_loops.
3377         (current_function_infinite_loop): New.
3378         * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3379         (break_maybe_infinite_loop): New.
3380         (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3381         (finish_do_stmt, finish_for_cond, finish_for_stmt)
3382         (begin_range_for_stmt): Use them.
3383         * decl.c (finish_function): Don't warn about missing return
3384         if current_function_infinite_loop.
3385         * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3386         * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3388         * call.c (build_op_delete_call): Use make_tree_vector and
3389         release_tree_vector.
3391 2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
3393         PR c++/58980
3394         * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3395         nested_name_specifier.
3397 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3399         * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3400         see if there is an attribute after function decl.  If so, then
3401         parse them now.
3402         (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3403         enabled function late parsing.
3404         (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3405         attribute for a SIMD-enabled function.
3406         (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3407         the function is used by SIMD-enabled function (indicated by NULL
3408         pragma token).   Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3409         PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3410         (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3411         vectorlength clause in SIMD-enabled function and #pragma SIMD's
3412         vectorlength clause.  Added a new bool parameter to differentiate
3413         between the two.
3414         (cp_parser_cilk_simd_fn_vector_attrs): New function.
3415         (is_cilkplus_vector_p): Likewise.
3416         (cp_parser_late_parsing_elem_fn_info): Likewise.
3417         (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3418         and "vectorlength" clauses when Cilk Plus is enabled.
3419         (cp_parser_omp_clause_linear): Added a new parameter of type bool
3420         and emit a sorry message when step size is a parameter.
3421         * parser.h (cp_parser::cilk_simd_fn_info): New field.
3422         * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3423         flag_openmp.
3424         * pt.c (apply_late_template_attributes): Likewise.
3426 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3428         PR middle-end/58809
3429         * semantics.c (finish_omp_reduction_clause): Reject
3430         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3432 2014-01-22  Ville Voutilainen  <ville.voutilainen@gmail.com>
3434         PR c++/59482
3435         * parser.c (cp_parser_class_head): Push the class before parsing
3436         the base-clause, pop after it.
3438 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
3440         * decl2.c (cpp_check): Revert prototype change.
3442 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
3444         PR c++/59270
3445         PR c++/58811
3446         * init.c (build_value_init_noctor): Don't pass error_mark_node to
3447         build_value_init.
3449 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
3451         PR c++/59269
3452         * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3453         only when errorcount == 0.
3455 2014-01-17  Marek Polacek  <polacek@redhat.com>
3457         PR c++/59838
3458         * cvt.c (ocp_convert): Don't segfault on non-existing
3459         ENUM_UNDERLYING_TYPE.
3461 2014-01-16  Jason Merrill  <jason@redhat.com>
3463         PR c++/59821
3464         * tree.c (bot_manip): Update the location of builtin_LINE and
3465         builtin_FILE calls.
3467 2014-01-14  Jason Merrill  <jason@redhat.com>
3469         PR c++/59659
3470         * typeck2.c (massage_init_elt): New.
3471         (process_init_constructor_record)
3472         (process_init_constructor_union): Use it.
3473         (process_init_constructor_array): Use it.  Use RANGE_EXPR.
3474         (split_nonconstant_init_1): Handle it.
3475         * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3477 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3479         PR c++/59631
3480         * parser.c (cp_parser_postfix_expression): Added a new if-statement
3481         and replaced an existing if-statement with else-if statement.
3482         Changed an existing error message wording to match the one from the C
3483         parser.
3485 2014-01-08  Jason Merrill  <jason@redhat.com>
3487         PR c++/59614
3488         * class.c (abi_tag_data): Add tags field.
3489         (check_abi_tags): Initialize it.
3490         (find_abi_tags_r): Support collecting missing tags.
3491         (mark_type_abi_tags): Don't look at template args.
3492         (inherit_targ_abi_tags): New.
3493         (check_bases_and_members): Use it.
3494         * cp-tree.h (ABI_TAG_IMPLICIT): New.
3495         * mangle.c (write_abi_tags): Check it.
3497 2014-01-07  Jason Merrill  <jason@redhat.com>
3499         PR c++/58856
3500         * pt.c (num_innermost_template_parms): New.
3501         (get_underlying_template): Use it.
3503         PR c++/58965
3504         * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3506 2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
3508         * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3509         the letter of 20.11.6 about Base and Derived naming the same
3510         class type modulo cv-qualifiers.
3512 2014-01-06  Adam Butcher  <adam@jessamine.co.uk>
3514         PR c++/59635
3515         * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3516         function as unimplemented for generic lambdas with varargs.
3518         PR c++/59636
3519         * parser.c (cp_parser_template_parameter): Early out with
3520         error_mark_node if parameter declaration was not parsed.
3522         PR c++/59629
3523         * parser.c (cp_parser_lambda_expression): Save/reset/restore
3524         auto_is_implicit_function_template_parm_p around lambda body.
3526         PR c++/59638
3527         * parser.c (cp_parser_init_declarator): Undo fully implicit
3528         template parameter list when declarator is not a function.
3530 2014-01-03  Marc Glisse  <marc.glisse@inria.fr>
3532         PR c++/58950
3533         * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3535 2014-01-03  Tobias Burnus  <burnus@net-b.de>
3537         PR c++/58567
3538         * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3540 2014-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
3542         Core DR 1442
3543         PR c++/59165
3544         * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3545         as include_std to perform_koenig_lookup.
3546         (cp_parser_postfix_expression): Adjust.
3547         * pt.c (tsubst_copy_and_build): Likewise.
3548         * semantics.c (perform_koenig_lookup): Remove bool parameter.
3549         (omp_reduction_lookup): Adjust.
3550         * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3551         (lookup_arg_dependent): Likewise.
3552         (lookup_function_nonclass): Adjust.
3553         * name-lookup.h: Adjust declaration.
3554         * cp-tree.h: Likewise.
3556 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3558         PR c++/59087
3559         * parser.c (cp_parser_userdef_numeric_literal): Mention
3560         -fext-numeric-literals in the message.
3562 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3564         PR c++/59641
3565         * call.c (build_conditional_expr_1): Check the return value of
3566         force_rvalue.
3568 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3570         * call.c (convert_like_real): Check complain.
3572 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3574         PR c++/59378
3575         * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3576         in templates.
3578 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3580         Update copyright years
3582 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3584         * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3585         the standard form for the copyright notice.
3587 Copyright (C) 2014 Free Software Foundation, Inc.
3589 Copying and distribution of this file, with or without modification,
3590 are permitted in any medium without royalty provided the copyright
3591 notice and this notice are preserved.