PR c++/57979
[official-gcc.git] / gcc / cp / ChangeLog
blob6f947b4b81143c365dbc3630dc3d102b08f60005
1 2014-11-19  Jason Merrill  <jason@redhat.com>
3         PR c++/57979
4         * init.c (decl_really_constant_value): Rename from
5         integral_constant_value.
6         (scalar_constant_value): Similar but limited to scalar results.
7         (decl_constant_value_safe): Remove.
8         (constant_value_1): Respect return_aggregate_cst_ok_p.
9         * typeck.c (decay_conversion): Use scalar_constant_value.
10         * call.c (convert_like_real): Likewise.
11         * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
12         * typeck.c (decay_conversion): Or ARRAY_TYPE.
13         * constexpr.c (struct constexpr_ctx): Add strict field.
14         (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
15         decl_constant_value and decl_really_constant_value.
16         (cxx_eval_outermost_constant_expr): Add strict parm.
17         (maybe_constant_init): Not strict.
18         (potential_constant_expression_1): Add strict parm.
19         Shorten most internal calls with RECUR macro.
20         * cp-tree.h, pt.c, semantics.c: Adjust.
22 2014-11-19  Jason Merrill  <jason@redhat.com>
24         PR c++/63928
25         * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
27 2014-11-19  Paolo Carlini  <paolo.carlini@oracle.com>
29         PR c++/55425
30         * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
31         and __PRETTY_FUNCTION__.
33 2014-11-18  Jason Merrill  <jason@redhat.com>
35         PR c++/63924
36         * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
37         from a variable of empty class type is constant.
39         * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
40         (potential_constant_expression_1): Handle STMT_EXPR.
42         * constexpr.c (cxx_eval_constant_expression): Give jump_target a
43         default argument.
44         (lots): Omit NULL jump_target arguments.
46         * constexpr.c (struct constexpr_ctx): Add quiet field.
47         (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
48         (lots): Replace allow_non_constant parameter with ctx->quiet.
50         PR c++/63940
51         * constexpr.c (cxx_eval_binary_expression): Don't assume the
52         expression was already folded.
53         (cxx_eval_unary_expression): Likewise.
55 2014-11-18  Marc Glisse  <marc.glisse@inria.fr>
57         PR libstdc++/43622
58         * rtti.c (emit_support_tinfos): Handle __float128.
60 2014-11-18  Jason Merrill  <jason@redhat.com>
62         PR c++/63925
63         * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
65         PR c++/63934
66         * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
67         rather than VOID_TYPE_P.
69         * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
71         PR c++/58102
72         * typeck2.c (store_init_value): Set it.
73         * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
74         * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
76 2014-11-17  Jason Merrill  <jason@redhat.com>
78         PR c++/33911
79         * call.c (build_call_a): Don't warn_deprecated_use here.
80         (build_over_call): Or here.
81         * decl2.c (mark_used): Do it here.
82         (is_late_template_attribute): Attribute deprecated is not deferred.
83         (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
84         * parser.c (cp_parser_template_name): Warn about deprecated template.
85         (cp_parser_template_argument): Likewise.
87         PR c++/50473
88         * decl.c (cp_finish_decl): Don't try to process a non-dependent
89         constant initializer for a reference.
90         * pt.c (value_dependent_expression_p): A reference is always
91         dependent.
92         * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
93         on any NOP_EXPRs.
95         Handle C++14 constexpr flow control.
96         * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
97         (cxx_eval_statement_list): New.
98         (cxx_eval_constant_expression): Handle LABEL_EXPR,
99         CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR.  Handle jump
100         semantics of RETURN_EXPR.
101         (many functions): Add jump_target parameter.
102         (returns, breaks, continues, switches, label_matches): New.
103         * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
104         * cp-gimplify.c (begin_bc_block): Set them.
106         * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
107         (genericize_for_stmt): Handle null statement-list.
109         * constexpr.c (use_new_call): Always use new call handling.
111         C++14 constexpr support (minus loops and multiple returns)
112         * constexpr.c (use_new_call): New macro.
113         (build_data_member_initialization): Ignore non-mem-inits.
114         (check_constexpr_bind_expr_vars): Remove C++14 checks.
115         (constexpr_fn_retval): Likewise.
116         (check_constexpr_ctor_body): Do nothing in C++14.
117         (massage_constexpr_body): In C++14 only collect mem-inits.
118         (get_function_named_in_call): Handle null CALL_EXPR_FN.
119         (cxx_bind_parameters_in_call): Build bindings in same order as
120         parameters.  Don't treat iniviref parms specially in new call mode.
121         (cxx_eval_call_expression): If use_new_call, do constexpr expansion
122         based on DECL_SAVED_TREE rather than the massaged constexpr body.
123         Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
124         (is_sub_constant_expr): Don't mess with ctx.ctor here.
125         (cxx_eval_component_reference): A null element means we're mid-
126         initialization.
127         (cxx_eval_store_expression, cxx_eval_increment_expression): New.
128         (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
129         MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
130         PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
131         POSTDECREMENT_EXPR.  Don't look into DECL_INITIAL of variables in
132         constexpr functions.  In new-call mode find parms in the values table.
133         (potential_constant_expression_1): Handle null CALL_EXPR_FN.
134         Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
135         PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
136         POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
137         CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
138         EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
139         CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
140         SWITCH_STMT, ASM_EXPR.
141         (cxx_eval_vec_init_1): Call build_aggr_init_expr.
142         (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
143         caller wants an lvalue.
144         (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
145         (maybe_constant_init): Look through INIT_EXPR.
146         (ensure_literal_type_for_constexpr_object): Set
147         cp_function_chain->invalid_constexpr.
148         * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
149         * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
150         (check_for_uninitialized_const_var): Likewise.
151         (maybe_save_function_definition): Check it.
152         * parser.c (cp_parser_jump_statement): Set
153         cp_function_chain->invalid_constexpr.
154         (cp_parser_asm_definition): Likewise.
156         PR c++/52282
157         * decl.c (build_ptrmemfunc_type): Don't build a different
158         RECORD_TYPE for a qualified PMF.
159         * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
160         (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
161         * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
162         * tree.c (cp_walk_subtrees): Likewise.
163         (cp_build_qualified_type_real): Remove special PMF handling.
165 2014-11-15  Jason Merrill  <jason@redhat.com>
167         * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
168         an expression.
170         * constexpr.c (cxx_eval_builtin_function_call): Use
171         fold_builtin_call_array.
173         * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
175 2014-11-14  Paolo Carlini  <paolo.carlini@oracle.com>
177         * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
178         * parser.c (cp_parser_omp_clause_collapse): Likewise.
179         (cp_parser_enumerator_definition): Don't call
180         instantiate_non_dependent_expr...
181         * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
182         * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
183         * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
184         the final gcc_assert.
186         * constexpr.c (fold_non_dependent_expr): Add.
187         * cp-tree.h (fold_non_dependent_expr): Declare it.
188         * call.c (null_ptr_cst_p): Use it.
189         * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
190         * semantics.c (begin_maybe_infinite_loop): Likewise.
191         * typeck.c (cp_build_binary_op): Likewise.
192         * typeck2.c (check_narrowing): Likewise.
194         * pt.c (fold_non_dependent_expr): Rename to
195         instantiate_non_dependent_expr.
196         (fold_non_dependent_expr_sfinae): Rename to
197         instantiate_non_dependent_expr_sfinae.
198         (convert_nontype_argument, build_non_dependent_expr): Adjust.
199         * decl.c (compute_array_index_type): Likewise.
200         * parser.c (cp_parser_parenthesized_expression_list,
201         cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
202         Likewise.
203         * semantics.c (end_maybe_infinite_loop, finish_static_assert):
204         Likewise.
205         * typeck.c (cxx_alignas_expr): Likewise.
206         * typeck2.c (store_init_value, massage_init_elt): Likewise.
207         * call.c: Adjust comments.
208         * class.c: Likewise.
209         * constexpr.c: Likewise.
210         * decl2.c: Likewise.
211         * tree.c: Likewise.
213 2014-11-14  Jonathan Wakely  <jwakely@redhat.com>
215         * mangle.c (find_substitution): Look for abi_tag on class templates.
217 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
218             Thomas Schwinge  <thomas@codesourcery.com>
219             Ilya Verbin  <ilya.verbin@intel.com>
220             Andrey Turetskiy  <andrey.turetskiy@intel.com>
222         * Make-lang.in (c++.install-common): Do not install for the offload
223         compiler.
225 2014-11-13  Kai Tietz  <ktietz@redhat.com>
227         * cp-tree.h (cp_build_function_call): Remove prototype.
228         (cp_build_addr_expr_strict): Likewise.
229         (build_typed_address): Likewise.
230         * typeck.c (build_typed_address): Removed.
231         (cp_build_addr_expr_strict): Make static.
232         (cp_build_function_call): Likewise.
234 2014-11-12  Paolo Carlini  <paolo.carlini@oracle.com>
236         DR 1510
237         PR c++/60420
238         * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
239         * decl.c (grokdeclarator): Use it.
240         * parser.c (cp_parser_simple_type_specifier): Likewise.
241         * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
243 2014-11-11  Paolo Carlini  <paolo.carlini@oracle.com>
245         PR c++/63265
246         * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
247         constant the condition.
249 2014-11-10  Andi Kleen  <ak@linux.intel.com>
251         * semantics.c (finish_goto_stmt): Call check_no_cilk.
252         (finish_while_stmt_cond): Dito.
253         (finish_do_stmt): Dito.
254         (finish_for_cond): Dito.
255         (finish_switch_cond): Dito.
257 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
259         * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
260         OPT_Wshift_count_overflow in the warnings.
262 2014-11-09  Jason Merrill  <jason@redhat.com>
264         DR 799
265         * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
266         same scalar type is an rvalue.
268         DR 2007
269         * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
271 2014-11-07  Jason Merrill  <jason@redhat.com>
273         DR 1558
274         * pt.c (dependent_alias_template_spec_p): New.
275         (dependent_type_p_r): Handle dependent alias template specialization.
276         (template_args_equal): A dependent alias template specializations
277         is not equal to its underlying type as a template argument.
278         * tree.c (strip_typedefs): Don't strip a dependent alias
279         template-id.
281         * parser.c (cp_parser_unqualified_id): Handle __func__ here.
282         (cp_parser_primary_expression): Not here.
284 2014-11-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>
286         PR c++/63366
287         * decl.c (grokdeclarator): Fix __complex meaning __complex double.
289 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
291         * constexpr.c: Remove redundant enum from machine_mode.
293 2014-10-28  Jason Merrill  <jason@redhat.com>
295         * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
297 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
299         * call.c: Adjust include files.
300         * class.c: Ditto.
301         * decl2.c: Ditto.
302         * decl.c: Ditto.
303         * lambda.c: Ditto.
304         * mangle.c: Ditto.
305         * method.c: Ditto.
306         * optimize.c: Ditto.
307         * parser.c: Ditto.
308         * semantics.c: Ditto.
309         * tree.c: Ditto.
310         * vtable-class-hierarchy.c: Ditto.
312 2014-10-24  Jason Merrill  <jason@redhat.com>
314         Implement N3653 (Member initializers and aggregates) and fix
315         references to 'this' in constexpr constructors.
316         * class.c (check_field_decls): In C++14 an NSDMI does not make the
317         class non-aggregate.
318         * constexpr.c (struct constexpr_ctx): New.
319         (cxx_bind_parameters_in_call): Handle 'this'.
320         (cxx_eval_call_expression): Create new constexpr_ctx.
321         (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
322         (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
323         (cxx_eval_bare_aggregate): Use them.  Build CONSTRUCTOR early.
324         (cxx_eval_vec_init_1): Likewise.
325         (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
326         [TARGET_EXPR]: Build new constexpr_ctx.
327         [PLACEHOLDER_EXPR]: New.
328         (cxx_eval_outermost_constant_expr): Build new constexpr_ctx.  Add
329         object parameter.
330         (is_sub_constant_expr): Build new constexpr_ctx.
331         (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
332         Allow 'this'.
333         * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
334         * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
335         * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
336         * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
337         * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
338         (build_ctor_subob_ref, replace_placeholders): New.
339         * typeck2.c (store_init_value): Use replace_placeholders.
340         (process_init_constructor_record): Make zero-init before NSDMI
341         explicit.
343 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
345         * cp-gimplify.c: Adjust include files.
347 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
349         PR c++/53061
350         * cp-objcp-common.c: Do not include new.
351         (cxx_initialize_diagnostics): Move from here to ...
352         * error.c (cxx_initialize_diagnostics): : ... here. Move
353         diagnostics initialization here from init_error.
354         (cxx_pp): Use a real pointer not a macro.
355         (init_error): Just initialize cxx_pp.
356         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
357         not set maximum line length.
359 2014-10-23  Jonathan Wakely  <jwakely@redhat.com>
361         PR c++/63619
362         * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
364 2014-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
366         * parser.c (cp_parser_unary_expression): Add default arguments.
367         (cp_parser_cast_expression, cp_parser_sizeof_operand,
368         cp_parser_omp_atomic): Adjust.
370 2014-10-20  Jason Merrill  <jason@redhat.com>
372         PR c++/63601
373         * lambda.c (current_nonlambda_function): New.
374         * semantics.c (finish_this_expr): Use it.
375         * cp-tree.h: Declare it.
377 2014-10-17  Alan Modra  <amodra@gmail.com>
379         PR middle-end/61848
380         * decl.c (merge_decls): Don't merge section name, comdat group or
381         tls model to newdecl symtab node, instead merge to olddecl.
382         Override existing olddecl section name.  Set tls_model for all
383         thread-local vars, not just OMP thread-private ones.  Remove
384         incorrect comment.
386 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
388         * cp-tree.h: Adjust include files.
390 2014-10-15  Jason Merrill  <jason@redhat.com>
392         PR c++/63528
393         * pt.c (lookup_template_variable): Call coerce_template_parms.
395 2014-10-15  Paolo Carlini  <paolo.carlini@oracle.com>
397         * semantics.c (is_instantiation_of_constexpr, literal_type_p,
398         ensure_literal_type_for_constexpr_object,
399         constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
400         retrieve_constexpr_fundef, is_valid_constexpr_fn,
401         build_anon_member_initialization, build_data_member_initialization,
402         check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
403         check_constexpr_ctor_body, sort_constexpr_mem_initializers,
404         build_constexpr_constructor_member_initializers, constexpr_fn_retval,
405         massage_constexpr_body, cx_check_missing_mem_inits,
406         register_constexpr_fundef, explain_invalid_constexpr_fn,
407         constexpr_call_hasher::hash, constexpr_call_hasher::equal,
408         maybe_initialize_constexpr_call_table, get_function_named_in_call,
409         get_nth_callarg, lookup_parameter_binding,
410         cxx_eval_builtin_function_call, adjust_temp_type,
411         cxx_bind_parameters_in_call, push_cx_call_context,
412         pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
413         reduced_constant_expression_p, verify_constant,
414         cxx_eval_unary_expression, cxx_eval_binary_expression,
415         cxx_eval_conditional_expression, cxx_eval_array_reference,
416         cxx_eval_component_reference, cxx_eval_bit_field_ref,
417         cxx_eval_logical_expression, base_field_constructor_elt,
418         cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
419         cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
420         cxx_eval_trinary_expression, var_in_constexpr_fn,
421         cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
422         is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
423         maybe_constant_init, potential_constant_expression_1,
424         potential_constant_expression, potential_rvalue_constant_expression,
425         require_potential_constant_expression,
426         require_potential_rvalue_constant_expression): Moved definitions...
427         * constexpr.c: ... here, new file.
428         * Make-lang.in: Update.
429         * config-lang.in: Likewise.
431 2014-10-14  Jason Merrill  <jason@redhat.com>
433         PR c++/63455
434         * parser.c (struct saved_token_sentinel): New.
435         (cp_parser_statement): Use it.
436         (cp_parser_start_tentative_firewall): New.
437         (cp_parser_end_tentative_firewall): New.
438         (cp_parser_lambda_expression): Use them.
439         (cp_parser_statement_expr): New.
440         (cp_parser_primary_expression): Use it.
442 2014-10-14  DJ Delorie  <dj@redhat.com>
444         * typeck.c (cp_common_type): Check for all __intN types, not just
445         __int128.
446         * decl.c (grokdeclarator): Likewise.
447         * rtti.c (emit_support_tinfos): Check for all __intN types, not just
448         __int128.
449         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
450         for all __intN types, not just __int128.
451         (cp_parser_simple_type_specifier): Likewise.
452         * mangle.c (integer_type_codes): Remove int128-specific codes.
453         * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
454         __intN was specified.
455         * lex.c (init_reswords): Reserve all __intN keywords.
457 2014-10-14  Marc Glisse  <marc.glisse@inria.fr>
459         * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
461 2014-10-13  H.J. Lu  <hongjiu.lu@intel.com>
463         * mangle.c (mangle_conv_op_name_for_type): Cast elements to
464         unsigned long.
465         (print_template_statistics): Cast size and elements to long.
467 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
469         * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
470         pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
471         hashtab.
473 2014-10-10  Jason Merrill  <jason@redhat.com>
475         PR c++/62115
476         * class.c (build_base_path): Preserve rvalueness.
477         * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
478         * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
480         PR c++/63194
481         * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
483         * method.c (implicitly_declare_fn): Handle deleted lambda default
484         ctor and copy assop here.
485         * class.c (check_bases_and_members): Not here.
486         (add_implicitly_declared_members): And don't set
487         CLASSTYPE_LAZY_MOVE_ASSIGN.
489         * semantics.c (finish_id_expression): Check for error_mark_node.
491 2014-10-09  Jason Merrill  <jason@redhat.com>
493         PR c++/63207
494         * semantics.c (outer_var_p): Non-static.
495         (process_outer_var_ref): Split out from finish_id_expression.
496         * pt.c (tsubst_copy_and_build): Call them.
497         * cp-tree.h: Declare them.
499 2014-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
501         * semantics.c (check_constexpr_ctor_body_1): New.
502         (check_constexpr_ctor_body): Use it; add bool parameter.
503         (build_data_member_initialization): Handle BIND_EXPR and
504         USING_STMT in the main conditional.
505         (build_constexpr_constructor_member_initializers): Do not
506         handle BIND_EXPR here.
507         (constexpr_fn_retval): Handle BIND_EXPR in the switch.
508         (massage_constexpr_body): Don't do it here.
509         * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
510         Adjust check_constexpr_ctor_body call.
511         (cp_parser_compound_statement): Do not pedwarn for compound-statement
512         in constexpr function in C++14 mode.
513         * cp-tree.h (check_constexpr_ctor_body): Update declaration.
515 2014-10-09  Jason Merrill  <jason@redhat.com>
517         PR c++/63309
518         * parser.c (cp_parser_class_head): push_template_decl for members
519         of templates, too.
521         PR c++/63415
522         * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
523         (iterative_hash_template_arg): Likewise.
525         PR c++/63437
526         * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
527         * semantics.c (force_paren_expr): And set it.
528         * typeck.c (check_return_expr): And handle it.
530 2014-10-09  Marc Glisse  <marc.glisse@inria.fr>
532         * decl.c (grokdeclarator): constexpr only implies const in C++11.
534 2014-10-08  Jason Merrill  <jason@redhat.com>
536         PR c++/63405
537         * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
539         PR c++/63485
540         * tree.c (build_cplus_array_type): Look for a type with no
541         typedef-name or attributes.
543         * call.c (call_copy_ctor): New.
544         (build_over_call): Use it to avoid infinite recursion on invalid code.
546 2014-10-07  Jason Merrill  <jason@redhat.com>
548         * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
550 2014-10-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
552         * cp/parser.c: Allow [[deprecated]] for C++11.  Issue a pedwarn.
554 2014-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
556         PR c++/55250
557         * semantics.c (check_constexpr_bind_expr_vars): New.
558         (check_constexpr_ctor_body, massage_constexpr_body): Use it.
559         (build_constexpr_constructor_member_initializers): Handle
560         BIND_EXPR in the main conditional.
562 2014-10-02  Mark Wielaard  <mjw@redhat.com>
564         PR debug/63239
565         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
566         (cp_function_decl_deleted_p): New prototype.
567         * cp-objcp-common.c (cp_function_deleted_p): New function.
569 2014-10-03  Marc Glisse  <marc.glisse@inria.fr>
571         PR c++/54427
572         PR c++/57198
573         PR c++/58845
574         * typeck.c (cp_build_binary_op): save_expr after convert to save
575         redundant operations.
576         [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
577         (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
579 2014-10-03  Jason Merrill  <jason@redhat.com>
581         * decl.c (start_decl): Complain about static/thread_local vars
582         in constexpr function.
583         (check_for_uninitialized_const_var): Also uninitialized vars.
584         * parser.c (cp_parser_jump_statement): And gotos.
585         (cp_parser_asm_operand_list): And asm.
586         (cp_parser_try_block): And try.
587         * semantics.c (ensure_literal_type_for_constexpr_object): And
588         non-literal.
590         * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
591         (var_in_constexpr_fn): New.
592         (cxx_eval_constant_expression): Look into DECL_INITIAL.
593         (potential_constant_expression_1): Allow constexpr-local vars.
595         PR c++/63362
596         * tree.c (strip_typedefs): Handle TREE_LIST.
598 2014-10-03  Paolo Carlini  <paolo.carlini@oracle.com>
600         * parser.c (cp_parser_assignment_expression,
601         cp_parser_constant_expression): Add default arguments.
602         (cp_parser_primary_expression,
603         cp_parser_postfix_open_square_expression,
604         cp_parser_parenthesized_expression_list,
605         cp_parser_question_colon_clause,
606         cp_parser_expression, cp_parser_constant_expression,
607         cp_parser_label_for_labeled_statement, cp_parser_static_assert,
608         cp_parser_template_argument, cp_parser_enumerator_definition,
609         cp_parser_member_declaration, cp_parser_constant_initializer,
610         cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
611         cp_parser_std_attribute_spec, cp_parser_objc_message_args,
612         cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
613         cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
614         cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
615         cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
616         cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
618 2014-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
620         PR c++/53025
621         * cp-tree.h (struct saved_scope): Add noexcept_operand.
622         (cp_noexcept_operand): Define.
623         * call.c (build_over_call): Use it.
624         * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
625         * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
627 2014-10-01  Jason Merrill  <jason@redhat.com>
629         PR c++/63362
630         * method.c (constructible_expr): Handle value-init of non-class.
631         * parser.c (cp_parser_trait_expr): Allow pack expansion.
632         * pt.c (tsubst_copy_and_build): Handle pack expansion.
634         PR c++/63362
635         * class.c (type_has_non_user_provided_default_constructor): Rename
636         from type_has_user_provided_default_constructor, reverse sense.
637         (default_init_uninitialized_part, explain_non_literal_class): Adjust.
638         (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
639         * call.c (build_new_method_call_1): Adjust.
640         * cp-tree.h: Adjust.
641         * decl.c (grok_special_member_properties): Don't set
642         TYPE_HAS_COMPLEX_DFLT.
643         * init.c (build_value_init_noctor): Don't use
644         type_has_user_provided_default_constructor.
646 2014-09-30  Jason Merrill  <jason@redhat.com>
648         * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
649         CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
650         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
651         * parser.c (cp_parser_primary_expression): Likewise.
652         (cp_parser_trait_expr): Likewise.  Handle variadic trait.
653         * semantics.c (trait_expr_value): Likewise.
654         (finish_trait_expr): Likewise.
655         (check_trait_type): Handle variadic trait.  Return bool.
656         * method.c (build_stub_object): Add rvalue reference here.
657         (locate_fn_flags): Not here.
658         (check_nontriv, assignable_expr, constructible_expr): New.
659         (is_trivially_xible): New.
661         * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
662         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
663         * parser.c (cp_parser_primary_expression): Likewise.
664         (cp_parser_trait_expr): Likewise.
665         * semantics.c (trait_expr_value): Likewise.
666         (finish_trait_expr): Likewise.
668         * method.c (build_stub_object): Use CONVERT_EXPR.
669         * tree.c (build_dummy_object): Likewise.
670         (is_dummy_object): Adjust.
672         * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
673         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
674         * semantics.c (trait_expr_value): Likewise.
675         (finish_trait_expr): Likewise.
676         * parser.c (cp_parser_primary_expression): Likewise.
677         (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
679 2014-09-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
681        PR c++/16564
682        * error.c (print_instantiation_context): Delete.
683        * typeck2.c (build_x_arrow): Record location when pushing
684        template instantiation.
685        * pt.c (push_tinst_level): Make it a wrapper around ...
686        (push_tinst_level_loc): ... this. New function. Make excessive
687        template instantiation depth a fatal error. Record location. Use
688        bool as return type.
689        (instantiate_pending_templates): Make excessive
690        template instantiation depth a fatal error.
691        (problematic_instantiation_changed): Use bool as return type.
692        * cp-tree.h (print_instantiation_context): Delete.
693        (push_tinst_level): Update declaration.
694        (problematic_instantiation_changed): Likewise.
695        (push_tinst_level_loc): New.
697 2014-09-29  Richard Biener  <rguenther@suse.de>
699         * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
700         for conversions.
702 2014-09-26  Jason Merrill  <jason@redhat.com>
704         * mangle.c (find_substitution): Use write_abi_tags.
706 2014-09-25  Marek Polacek  <polacek@redhat.com>
708         PR c++/61945
709         * class.c (warn_hidden): Check for FUNCTION_DECL.
711 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
713         PR c++/63249
714         * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
715         on low_bound and length.
717 2014-09-24  Aldy Hernandez  <aldyh@redhat.com>
719         * class.c, decl.c, optimize.c: Rename all instances of
720         DECL_ABSTRACT to DECL_ABSTRACT_P.
722 2014-09-24  Marek Polacek  <polacek@redhat.com>
724         PR c/61405
725         PR c/53874
726         * semantics.c (finish_switch_cond): Call unlowered_expr_type.
727         * tree.c (bot_manip): Add default case.
728         * parser.c (cp_parser_primary_expression): Cast the controlling
729         expression of a switch to an int.
730         (cp_parser_unqualified_id): Likewise.
732 2014-09-23  Paolo Carlini  <paolo.carlini@oracle.com>
734         PR c++/61857
735         * parser.c (cp_parser_skip_to_closing_square_bracket,
736         cp_parser_array_designator_p): New.
737         (cp_parser_initializer_list): Use the latter.
739 2014-09-22  Jason Merrill  <jason@redhat.com>
741         * semantics.c (finish_non_static_data_member): In diagnostic, give
742         error at point of use and note at point of declaration.
744         PR c++/63320
745         PR c++/60463
746         PR c++/60755
747         * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
748         not finding 'this'.
750 2014-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
752         PR c++/62219
753         * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
755 2014-09-22  Jason Merrill  <jason@redhat.com>
757         * decl.c (poplevel): Don't warn about unused vars in template scope.
758         * error.c (dump_decl): Handle variable templates.
760 2014-09-20  Jason Merrill  <jason@redhat.com>
762         PR c++/62017
763         * decl.c (begin_destructor_body): Only clobber the as-base part of
764         *this.
766 2014-09-19  Jason Merrill  <jason@redhat.com>
768         PR c++/61392
769         * mangle.c (write_expression): Use unresolved-name mangling for
770         DR850 case.
772         PR c++/61465
773         * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
774         after pulling out an element from a CONSTRUCTOR.
776 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
778         PR c++/63248
779         * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
780         on type of type dependent expressions, and don't call it if
781         handle_omp_array_sections has kept TREE_LIST because something
782         was type dependent.
783         * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
784         Use keep_next_level, begin_omp_structured_block and
785         finish_omp_structured_block instead of push_stmt_list and
786         pop_stmt_list.
788 2014-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
790         PR c++/62232
791         * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
792         for final class types.
794 2014-09-15  Jason Merrill  <jason@redhat.com>
796         * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
797         necessary.  Call inherit_targ_abi_tags here.
798         * class.c (check_bases_and_members): Not here.
799         (inherit_targ_abi_tags): Check CLASS_TYPE_P.
800         * cp-tree.h: Declare inherit_targ_abi_tags.
802 2014-09-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
804         Do not diagnose lambda default arguments in c++14 modes.
805         * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
806         conditional.
808 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
810         * Make-lang.in (check_g++_parallelize): Change to just an upper bound
811         number.
813 2014-09-13  Marek Polacek  <polacek@redhat.com>
815         PR c++/60862
816         * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
817         location of a call expression.
819 2014-09-11  Jason Merrill  <jason@redhat.com>
821         PR c++/63201
822         * decl.c (start_decl): Handle specialization of member variable
823         template.
824         * pt.c (check_explicit_specialization): Adjust error.
826 2014-09-11  Paolo Carlini  <paolo.carlini@oracle.com>
828         PR c++/61489
829         * typeck2.c (process_init_constructor_record): Do not warn about
830         missing field initializer if EMPTY_CONSTRUCTOR_P (init).
832 2014-09-11  Jason Merrill  <jason@redhat.com>
834         PR c++/63139
835         * pt.c (tsubst_pack_expansion): Simplify substitution into T....
836         (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
838 2014-09-10  Jason Merrill  <jason@redhat.com>
840         PR c++/61659
841         * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
842         (duplicate_decls, start_decl): Likewise.
843         * pt.c (check_explicit_specialization): Likewise.
844         (push_template_decl_real): Or static templates.
846 2014-09-08  Jason Merrill  <jason@redhat.com>
848         * typeck.c (build_class_member_access_expr): Move
849         -Winvalid-offsetof code...
850         * semantics.c (finish_offsetof): ...here.
851         * parser.c (cp_parser_builtin_offsetof): Remember the location of
852         the type argument.
853         * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
855         PR c++/62255
856         * pt.c (instantiate_decl): Handle recursive instantiation of
857         static data member.
859 2014-09-05  Jason Merrill  <jason@redhat.com>
861         PR c++/62659
862         * semantics.c (potential_constant_expression_1): Handle un-folded
863         pointer to member constants.
865 2014-09-04  Markus Trippelsdorf  <markus@trippelsdorf.de>
867         PR ipa/61659
868         * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
869         newdecl, not olddecl.
871 2014-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
873         DR 1453
874         * class.c (check_field_decls): A class of literal type cannot have
875         volatile non-static data members and base classes.
876         (explain_non_literal_class): Update.
878 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
879             Balaji V. Iyer  <balaji.v.iyer@intel.com>
880             Igor Zamyatin  <igor.zamyatin@intel.com>
882         * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
883         simplified.
884         * parser.c (cp_parser_cilk_for): New function.
885         (cp_parser_cilk_grainsize): Likewise.
886         (cp_parser_statement): Added RID_CILK_FOR case.
887         (cp_parser_omp_for_cond): Added CILK_FOR check.
888         (cp_parser_omp_for_loop_init): Change function argument to accept
889         tree_code instead just a bool flag; change the check to use that
890         tree_code; check for initialization declaration in case of Cilk_for.
891         (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
892         changed call to cp_parser_omp_for_loop_init according new arguments'
893         list.
894         (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
895         * pt.c (tsubst_expr): Added CILK_FOR case.
896         * semantics.c: Include convert.h.
897         (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
898         case; added OMP_CLAUSE__CILK_FOR_COUNT_.
899         (handle_omp_for_class_iterator): New argument lastp and its usage;
900         added NE_EXPR case.
901         (finish_omp_for): Changed call to handle_omp_for_class_iterator
902         according new arguments' list; in case of Cilk_for save very first
903         decl and create empty stmt_list block; use block to build correct
904         statement tree.
906 2014-08-31  Jason Merrill  <jason@redhat.com>
908         PR c++/62302
909         * optimize.c (cdtor_comdat_group): Just look at the
910         DECL_ASSEMBLER_NAME of the 'tors.
912 2014-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
914         PR c++/52892
915         * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
916         result of cxx_eval_constant_expression.
918 2014-08-26  Jason Merrill  <jason@redhat.com>
920         PR c++/58624
921         * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
922         (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
923         * semantics.c (finish_id_expression): Don't call TLS wrapper in a
924         template.
926 2014-08-25  Jason Merrill  <jason@redhat.com>
928         * pt.c (check_explicit_specialization): Don't complain about
929         non-template variable.
930         (template_for_substitution): Allow variable templates.
931         (check_template_variable): Fix logic for member var template.
932         * decl.c (start_decl): Don't complain about extra template header
933         here.
935         * decl.c (start_decl): Look through member variable template.
936         * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
937         * decl2.c (grokfield): Set DECL_CONTEXT earlier on
938         variables.
940 2014-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
942         PR c++/34938
943         * cp-tree.h (TFF_POINTER): Add.
944         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
945         argument too.
946         * error.c (dump_type_suffix): Actually print the const and noreturn
947         attribute when appropriate.
949 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
951         * decl.c (compute_array_index_type, grokdeclarator,
952         undeduced_auto_decl): Change from cxx1y to cxx14.
953         *lambda.c(add_capture()): Change error message from C++1y to C++14.
954         * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
955         cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
956         cp_parser_decltype, cp_parser_conversion_type_id,
957         cp_parser_simple_type_specifier, cp_parser_type_id_1,
958         cp_parser_template_type_arg, cp_parser_std_attribute,
959         cp_parser_template_declaration_after_export): Ditto.
960         * pt.c (tsubst): Ditto.
961         * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
962         * tree.c: Change comment.
963         * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
964         cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
966 2014-08-23  Jason Merrill  <jason@redhat.com>
968         Allow non-constexpr variable templates.
969         * decl2.c (note_variable_template_instantiation): New.
970         * cp-tree.h: Declare it.
971         * pt.c (instantiate_decl): Call it.
972         (push_template_decl_real): Allow non-constexpr variable templates.
973         * semantics.c (finish_id_expression): Mark the variable template
974         instantiation as used.
975         * mangle.c (write_mangled_name): Variable template instantiations
976         are mangled.
977         * parser.c (cp_parser_init_declarator): Complain about
978         non-function implicit templates.
980 2014-08-22  Marek Polacek  <polacek@redhat.com>
982         PR c++/62199
983         * parser.c (cp_parser_binary_expression): Check each LHS if it's
984         preceded with logical not.  Adjust call to
985         warn_logical_not_parentheses.
987 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
989         PR c++/57709
990         * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
991         declaration shadows a function declaration, unless the former
992         declares a function, pointer to function or pointer to member
993         function, because this is a common and valid case in real-world
994         code.
995         * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
996         Improve description.
998 2014-08-22  Jason Merrill  <jason@redhat.com>
1000         PR c++/62129
1001         * class.c (outermost_open_class): Fix logic.
1002         * decl.c (complete_vars): Fix logic.
1004 2014-08-22  Jason Merrill  <jason@redhat.com>
1006         PR c++/62129
1007         * class.c (outermost_open_class): New.
1008         * cp-tree.h: Declare it.
1009         * decl.c (maybe_register_incomplete_var): Use it.
1010         (complete_vars): Handle any constant variable.
1011         * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1013 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
1015         PR other/62008
1016         * cp-array-notation.c (build_array_notation_ref): Added correct
1017         handling of case with incorrect array.
1019 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1021         PR fortran/44054
1022         * error.c (cp_diagnostic_finalizer): Delete.
1023         (init_error): Do not set diagnostic_finalizer here.
1025 2014-08-19  Marek Polacek  <polacek@redhat.com>
1027         PR c++/62153
1028         * call.c (build_new_op_1): Remember the type of arguments for
1029         a comparison.  If either operand of a comparison is a boolean
1030         expression, call maybe_warn_bool_compare.
1032 2014-08-19  Jason Merrill  <jason@redhat.com>
1034         PR tree-optimization/62091
1035         * decl2.c (decl_needed_p): Return true for virtual functions when
1036         devirtualizing.
1038         PR lto/53808
1039         PR c++/61659
1040         * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1041         comdat_linkage.
1043 2014-08-19  Gerald Pfeifer  <gerald@pfeifer.com>
1045         * class.c (contains_empty_class_p): Remove.
1047 2014-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
1049         * parser.c (cp_parser_expression): Add default arguments.
1050         (cp_parser_primary_expression, cp_parser_postfix_expression,
1051         cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1052         cp_parser_unary_expression, cp_parser_direct_new_declarator,
1053         cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1054         cp_parser_lambda_body, cp_parser_expression_statement,
1055         cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1056         cp_parser_iteration_statement, cp_parser_jump_statement,
1057         cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1058         cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1059         cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1060         cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1061         cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1062         cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1063         cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1064         cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1065         cp_parser_transaction_expression): Adjust.
1067 2014-08-15  Jason Merrill  <jason@redhat.com>
1069         PR c++/61566
1070         * pt.c (lookup_template_class_1): Revert recent change.
1071         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1073         PR c++/61566
1074         * pt.c (instantiate_class_template_1): Ignore lambda on
1075         CLASSTYPE_DECL_LIST.
1076         (push_template_decl_real): A lambda is not primary.
1077         (lookup_template_class_1): Don't look for a lambda partial
1078         instantiation.
1079         * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1080         currently in a function and the lambda living in a function.
1081         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1083 2014-08-15  Richard Biener  <rguenther@suse.de>
1084             Jason Merrill  <jason@redhat.com>
1086         PR bootstrap/62077
1087         * tree.c (build_min_array_type, set_array_type_canon): Split out...
1088         (build_cplus_array_type): ...from here.  Only call build_array_type
1089         for main variants.
1091 2014-08-15  Paolo Carlini  <paolo.carlini@oracle.com>
1093         PR c++/62072
1094         Revert:
1095         2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1097         DR 1584
1098         PR c++/57466
1099         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1100         cv-qualifiers of function types.
1102 2014-08-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1104         * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1106 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1108         * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1109         cp_build_array_ref, cp_build_function_call_vec): When a
1110         pedwarn is suppressed under SFINAE, return error_mark_node.
1112         * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1113         tf_warning_or_error, where complain is a bool, glitch.
1115 2014-08-14  Ville Voutilainen  <ville.voutilainen@gmail.com>
1117         PR c++/62101
1118         * decl.c (grokdeclarator): Move the check for friend initializers..
1119         * decl2.c (grokfield) ..here. Postpone early return for friends
1120         until after the initializer check.
1122 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1124         PR c++/54377
1125         * pt.c (coerce_template_parms): Improve error message vs default
1126         arguments.
1128 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1130         * parser.c (cp_parser_init_declarator): Remove redundant check of
1131         decl_specifiers->type.
1133 2014-08-13  Jason Merrill  <jason@redhat.com>
1135         * call.c (build_x_va_arg): Support passing non-POD through ....
1136         (convert_arg_to_ellipsis): Likewise.
1138 2014-08-13  Andrew Sutton  <andrew.n.sutton@gmail.com>
1140         * pt.c (lookup_template_variable): Make dependent variable templates
1141         have unknown type.
1143 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
1145         * parser.c (cp_parser_elaborated_type_specifier): Handle
1146         specially cp_parser_template_id returning a BASELINK.
1148 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
1150         * parser.c (cp_parser_diagnose_invalid_type_name,
1151         cp_parser_make_typename_type): Remove scope parameter.
1152         (cp_parser_parse_and_diagnose_invalid_type_name,
1153         cp_parser_elaborated_type_specifier): Adjust calls.
1155 2014-08-12  Ville Voutilainen  <ville.voutilainen@gmail.com>
1157         Reject virt-specifiers on friends and member templates
1158         * friend.c (do_friend): Diagnose virt-specifiers.
1159         * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1161 2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
1163         * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1164         return type to bool; in C++11 for constants give errors, not pedwarns.
1165         * cp-tree.h (check_narrowing): Adjust declaration.
1166         * call.c (convert_like_real): Update calls.
1167         * semantics.c (finish_compound_literal): Likewise.
1169 2014-08-08  Jason Merrill  <jason@redhat.com>
1171         * pt.c (lookup_template_class_1): Copy abi_tag.
1173 2014-08-08  Kai Tietz  <ktietz@redhat.com>
1175         * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1176         that we operate on a true inline.
1178 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
1180         * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1181         optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1183 2014-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
1185         PR c++/51312
1186         * decl.c (build_enumerator): Handle class types with conversion
1187         operators via perform_implicit_conversion_flags and
1188         build_expr_type_conversion.
1190         * cvt.c (build_expr_type_conversion): Replace pair of errors
1191         with error + inform.
1193 2014-08-07  Jason Merrill  <jason@redhat.com>
1195         PR c++/62043
1196         * parser.c (c_parse_file): Change sorry to fatal_error.
1198         PR c++/61959
1199         * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1201 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
1203         * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1205 2014-08-06  Jason Merrill  <jason@redhat.com>
1207         * init.c (build_vec_init): Fix constant initialization of
1208         trailing elements.
1209         (build_value_init_noctor): Call maybe_constant_init.
1210         * semantics.c (maybe_constant_init): See through EXPR_STMT and
1211         conversion to void.
1213         PR c++/60417
1214         * init.c (build_vec_init): Reorganize earlier change a bit.
1216         PR c++/61994
1217         * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1218         if we're just returning an INIT_EXPR.
1220 2014-08-06  Jason Merrill  <jason@redhat.com>
1221             Braden Obrzut  <admin@maniacsvault.net>
1223         * pt.c (check_explicit_specialization): Don't test
1224         DECL_DECLARED_INLINE_P for a variable template.
1226 2014-08-06  Paolo Carlini  <paolo.carlini@oracle.com>
1228         PR c++/43906
1229         * typeck.c (cp_build_binary_op): Extend to more cases the
1230         -Waddress warning.
1232 2014-08-01  Braden Obrzut  <admin@maniacsvault.net>
1234         Implement constexpr variable templates
1235         * decl.c (grokvardecl): Handle specializations of variable templates.
1236         (grokdeclarator): Handle variable template id expressions and NULL_TREE
1237         return from grokvardecl.
1238         * decl2.c (check_member_template): Allow declaration of template member
1239         variables.
1240         * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1241         variable templates.
1242         * pt.c (check_template_variable): Accept variable temploids at
1243         non-class scope.
1244         (push_template_decl_real): The current instantiation of a template
1245         can be a VAR_DECL.
1246         (determine_specialization): Accept variable templates.
1247         (check_explicit_specialization): Handle and check for malformed
1248         variable template specializations.
1249         (lookup_template_variable): New.
1250         (tsubst_decl): Handle variable template specializations.
1251         (do_decl_instantiation): Handle template variables.
1252         (instantiate_decl): Handle template variables.
1253         * semantics.c (finish_template_variable): New.
1254         (finish_id_expression): Instantiate variable templates.
1255         * cp-tree.h (variable_template_p): New.
1257 2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
1259         PR c++/15339
1260         * decl.c (check_redeclaration_no_default_args): New.
1261         (duplicate_decls): Use it, handle default arguments
1262         in redeclarations of function templates.
1264 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1266         * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1268 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1270         * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1271         method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1272         instead of pointer_set.
1274 2014-08-01  Jason Merrill  <jason@redhat.com>
1276         PR c++/60417
1277         * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1278         init-list for trailing elements.
1279         * typeck2.c (process_init_constructor_array): Likewise.
1281 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
1283         DR 217 again
1284         * decl.c (duplicate_decls): Handle static member functions too.
1286 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1288         * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1289         in error output.
1291 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1293         PR other/61963
1294         * parser.c (cp_parser_array_notation): Added check for array_type.
1296 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1298         PR middle-end/61455
1299         * cp-array-notation.c (expand_array_notation_exprs): Handling of
1300         DECL_EXPR improved. Changed handling for INIT_EXPR.
1302 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
1304         * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1306 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
1308         * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1309         -fsanitize=alignment call ubsan_maybe_instrument_reference
1310         for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1311         for calls to member functions.
1313 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
1315         PR c++/60517
1316         * typeck.c (maybe_warn_about_returning_address_of_local): Return
1317         whether it is returning the address of a local variable.
1318         (check_return_expr): Return 0 instead of the address of a local
1319         variable.
1321 2014-07-30  Jason Merrill  <jason@redhat.com>
1323         PR lto/53808
1324         PR c++/61659
1325         * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1327 2014-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1329         PR c++/57397
1330         * pt.c (unify_arity): Add boolean parameter.
1331         (unify_too_few_arguments): Likewise.
1332         (type_unification_real): Diagnose correctly insufficient
1333         arguments in the presence of trailing variadic parameters;
1334         deducing multiple trailing packs as empty is fine.
1336 2014-07-30  Jason Merrill  <jason@redhat.com>
1338         PR c++/61659
1339         PR c++/61687
1340         Revert:
1341         * decl2.c (mark_all_virtuals): New variable.
1342         (maybe_emit_vtables): Check it instead of flag_devirtualize.
1343         (cp_write_global_declarations): Set it and give helpful diagnostic
1344         if it introduces errors.
1345         * class.c (finish_struct_1): Check it.
1347         PR lto/53808
1348         PR c++/61659
1349         * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1350         (check_explicit_specialization): Clear it on specializations.
1351         * decl.c (duplicate_decls, start_decl): Likewise.
1352         (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1353         * method.c (implicitly_declare_fn): Set DECL_COMDAT.  Determine
1354         linkage after setting the appropriate flags.
1355         * tree.c (decl_linkage): Don't check DECL_COMDAT.
1356         * decl2.c (mark_needed): Mark clones.
1357         (import_export_decl): Not here.
1359 2014-07-25  Edward Smith-Rowland  <3dw4rd@verizon.net>
1361         Implement N4051 - Allow typename in a template template parameter
1362         * parser.c (cp_parser_type_parameter_key): New funtion;
1363         (cp_parser_token_is_type_parameter_key): Ditto;
1364         (cp_parser_type_parameter): Look for type-parameter-key for all versions
1365         but pedwarn for less than cxx1z.
1367 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
1369         PR c++/50961
1370         * call.c (standard_conversion): Use resolve_nondeduced_context
1371         for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1373 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
1375         PR c++/61804
1376         * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1377         for '++' and '--'.
1379 2014-07-15  Jason Merrill  <jason@redhat.com>
1381         PR c++/61811
1382         * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1384         PR c++/60848
1385         PR c++/61723
1386         * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1387         * class.c (finish_struct): Reject invalid definition of
1388         std::initializer_list.
1390 2014-07-15  Paolo Carlini  <paolo.carlini@oracle.com>
1392         * call.c (convert_like_real): Call print_z_candidate and inform only
1393         if permerror returns true.
1395 2014-07-14  Jan Hubicka  <hubicka@ucw.cz>
1397         * class.c (build_clone): Do not clear assembler names of
1398         templates.
1399         * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1400         * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1401         as a special case return sizeof (struct tree_decl_non_common)
1402         for other decls.
1403         (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1404         initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1405         * cp/cp-tree.h (tree_template_decl): New structure.
1406         (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1407         (union cp_lang_tree_node): Add template_decl.
1408         (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1410 2014-07-14  Jason Merrill  <jason@redhat.com>
1412         PR c++/61445
1413         PR c++/56947
1414         * pt.c (instantiate_decl): Don't check defer_ok for local class
1415         members.
1417 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
1419         PR middle-end/61294
1420         * cp-tree.h (LITERAL_ZERO_P): Define.
1421         * parser.c (cp_parser_parenthesized_expression_list): Add
1422         want_literal_zero_p argument, if true, for literal zeros
1423         insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1424         (cp_parser_postfix_expression): Adjust
1425         cp_parser_parenthesized_expression_list caller, handle
1426         -Wmemset-transposed-args.
1427         (literal_zeros): New variable.
1429 2014-07-13  Jason Merrill  <jason@redhat.com>
1431         PR c++/58511
1432         * semantics.c (is_instantiation_of_constexpr): Return true for
1433         defaulted functions, too.
1434         (explain_invalid_constexpr_fn): Only use
1435         explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1436         * method.c (explain_implicit_non_constexpr): Pass
1437         DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1439         PR c++/58611
1440         * decl.c (check_initializer): Don't finish_compound_literal
1441         on erroneous constexpr init.
1443         PR c++/58612
1444         * tree.c (bot_replace): Only replace a dummy 'this' parm.
1446         PR c++/60628
1447         * decl.c (create_array_type_for_decl): Only check for auto once.
1449         PR c++/58636
1450         * call.c (build_list_conv): Don't try to build a list of references.
1452 2014-07-13  Edward Smith-Rowland  <3dw4rd@verizon.net>
1454         PR C++/60209 - Declaration of user-defined literal operator cause error
1455         * parser.c (cp_parser_operator): Fold treatment of strings
1456         and user-defined string literals.  Use the full string parser.
1457         (cp_parser_string_literal): Add flag to not look for literal operator.
1459 2014-07-11  Jason Merrill  <jason@redhat.com>
1461         PR c++/22434
1462         PR c++/61288
1463         * call.c (build_conditional_expr_1): Avoid reading freed memory.
1465 2014-07-11  Paolo Carlini  <paolo.carlini@oracle.com>
1467         PR c++/53159
1468         * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1469         into convflags.
1470         * decl.c (check_initializer): Don't call check_narrowing here,
1471         set LOOKUP_NO_NARROWING.
1472         * typeck2.c (digest_init_r): Likewise.
1474 2014-07-10  Jason Merrill  <jason@redhat.com>
1476         PR c++/61661
1477         * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1479         PR c++/61659
1480         PR c++/61687
1481         * decl2.c (mark_all_virtuals): New variable.
1482         (maybe_emit_vtables): Check it instead of flag_devirtualize.
1483         (cp_write_global_declarations): Set it and give helpful diagnostic
1484         if it introduces errors.
1485         * class.c (finish_struct_1): Check it.
1486         * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1488 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1490         PR c++/60686
1491         * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1492         outside class declaration, in friend declaration, and neither on
1493         constructor nor conversion operator.
1495 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1497         DR 1584
1498         PR c++/57466
1499         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1500         cv-qualifiers of function types.
1502 2014-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
1503             Paolo Carlini  <paolo.carlini@oracle.com>
1505         PR c++/59361
1506         * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1507         CPP_ELLIPSIS too.
1509 2014-07-07  Paolo Carlini  <paolo.carlini@oracle.com>
1511         * class.c (check_for_override): Wrap the 'final' and 'override'
1512         keywords in %< and %>.
1514 2014-07-06  Marek Polacek  <polacek@redhat.com>
1516         PR c/6940
1517         * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1518         * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1519         * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1520         function parameter.
1522 2014-07-02  Paolo Carlini  <paolo.carlini@oracle.com>
1524         * pt.c (convert_template_argument): Use inform instead of error in
1525         three places.
1527 2014-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
1529         PR c++/58781
1530         PR c++/60249
1531         PR c++/59867
1532         * parser.c (cp_parser_userdef_string_literal): Take a tree
1533         not a cp_token*.
1534         (cp_parser_string_literal): Don't hack the token stream.
1536 2014-06-30  Jason Merrill  <jason@redhat.com>
1538         PR c++/61659
1539         PR lto/53808
1540         * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1541         devirtualizing.
1542         * init.c (build_vtbl_address): Don't mark destructor.
1543         * class.c (finish_struct_1): Add all classes to keyed_classes
1544         if devirtualizing.
1546         PR c++/61647
1547         * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1549         PR c++/61566
1550         * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1552         * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1553         TYPE_BINFO or TYPE_LANG_SPECIFIC.
1554         * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1555         (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1556         * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1557         * pt.c (unify): Also check whether the argument is a PMF.
1559 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
1561         PR c++/54891
1562         * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1563         a '[' can also start a primary-expression.
1564         (cp_parser_cast_expression): Parse a cast-expression only tentatively
1565         when cp_parser_tokens_start_cast_expression returns -1.
1567 2014-06-30  Jason Merrill  <jason@redhat.com>
1569         PR c++/61539
1570         * pt.c (unify_one_argument): Type/expression mismatch just causes
1571         deduction failure.
1573         * semantics.c (simplify_aggr_init_expr): Remove remnants of
1574         2014-04-11 change.
1576 2014-06-30  Marek Polacek  <polacek@redhat.com>
1578         * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1579         function has no_sanitize_undefined attribute.
1580         * decl.c (compute_array_index_type): Don't instrument VLAs if the
1581         function has no_sanitize_undefined attribute.
1583 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
1585         PR middle-end/57541
1586         * cp-array-notation.c (expand_sec_reduce_builtin):
1587         Check that bultin argument is correct.
1588         * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1590 2014-06-28  Jonathan Wakely  <jwakely@redhat.com>
1592         DR 1579
1593         PR c++/58051
1594         * typeck.c (check_return_expr): Lookup as an rvalue even when the
1595         types aren't the same.
1597 2014-06-27  Jason Merrill  <jason@redhat.com>
1599         PR c++/61433
1600         * error.c (dump_template_bindings): Don't tsubst in a clone.
1602 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1604         PR c++/61614
1605         * semantics.c (finish_compound_literal): Revert r204228.
1607 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1609         * parser.c (cp_parser_compound_literal_p): New.
1610         (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1612 2014-06-26  Jason Merrill  <jason@redhat.com>
1614         * parser.c (cp_parser_for_init_statement): Change range-for error
1615         to pedwarn.
1617         N3994 Ranged-based for-loops: The Next Generation
1618         * parser.c (cp_lexer_nth_token_is): New.
1619         (cp_parser_for_init_statement): Allow "for (id : init)".
1621 2014-06-26  Teresa Johnson  <tejohnson@google.com>
1623         * class.c (dump_class_hierarchy): Use saved dump files.
1624         (dump_vtable): Ditto.
1625         (dump_vtt): Ditto.
1627 2014-06-26  Adam Butcher  <adam@jessamine.co.uk>
1629         PR c++/61537
1630         * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1631         parameter lists outside of function parameter scope.
1633 2014-06-25  Paolo Carlini  <paolo.carlini@oracle.com>
1635         DR 178
1636         PR c++/49132
1637         * typeck2.c (process_init_constructor_record): Do not complain about
1638         uninitialized const members, because within aggregate-initialization,
1639         members without explicit initializers are value-initialized.
1641 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
1643         * semantics.c (finish_omp_clauses): Make sure
1644         OMP_CLAUSE_LINEAR_STEP has correct type.
1646 2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
1648         * class.c (check_methods, create_vtable_ptr, determine_key_method,
1649         add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1650         FUNCTION_DECL check.
1651         * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1652         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1653         (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1654         (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1656 2014-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
1658         PR c++/33972
1659         * decl.c (grokdeclarator): Do not early check for operator-function-id
1660         as non-function.
1662 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
1664         * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1665         Adjust.
1667 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
1669         * parser.c (cp_parser_omp_for_loop): For
1670         #pragma omp parallel for simd move lastprivate clause from parallel
1671         to for rather than simd.
1673 2014-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
1675         DR 577
1676         PR c++/33101
1677         * decl.c (grokparms): Accept a single parameter of type 'void'.
1679 2014-06-20  Jason Merrill  <jason@redhat.com>
1681         PR c++/59296
1682         * call.c (add_function_candidate): Avoid special 'this' handling
1683         if we have a ref-qualifier.
1685         PR c++/61556
1686         * call.c (build_over_call): Call build_this in template path.
1688 2014-06-19  Jason Merrill  <jason@redhat.com>
1690         PR c++/59296
1691         * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1693 2014-06-18  Jason Merrill  <jason@redhat.com>
1695         PR c++/59296
1696         * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1697         ref-qualifier handling.
1699         PR c++/61507
1700         * pt.c (resolve_overloaded_unification): Preserve
1701         ARGUMENT_PACK_EXPLICIT_ARGS.
1703 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
1705         * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1706         argument.
1707         * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1709 2014-06-17  Jason Merrill  <jason@redhat.com>
1711         PR c++/60605
1712         * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1714 2014-06-15  Jason Merrill  <jason@redhat.com>
1716         PR c++/61488
1717         * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1719         PR c++/61500
1720         * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1722 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1724         * decl.c (grokvardecl): Fix pasto in previous patch.
1726 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1728         * decl.c (duplicate_decls): Use set_decl_tls_model.
1729         (grokdeclarator): Likewise.
1730         * semantics.c (finish_id_expression): Check TLS only for
1731         static variables.
1732         (finish_omp_threadprivate): Use decl_default_tls_model.
1733         * decl2.c (get_guard): Likewise.
1734         * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1736 2014-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1738         PR c++/33101
1739         * decl.c (grokparms): Improve error message about void parameters.
1740         * error.c (type_to_string): Fix aka cut off code.
1742 2014-06-12  Jason Merrill  <jason@redhat.com>
1744         * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1745         * cvt.c (type_promotes_to): Likewise.
1746         * mangle.c (write_type, write_expression): Likewise.
1747         (write_name, write_template_arg): Likewise.
1748         (mangle_decl): Make alias based on flag_abi_compat_version.
1749         Emit -Wabi warning here.
1750         (finish_mangling_internal): Not here.  Drop warn parm.
1751         (finish_mangling_get_identifier, finish_mangling): Adjust.
1752         (mangle_type_string, mangle_special_for_type): Adjust.
1753         (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1754         (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1755         (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1757         * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1758         * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1759         (layout_nonempty_base_or_field, end_of_class): Likewise.
1760         (layout_empty_base, build_base_field, layout_class_type): Likewise.
1761         (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1762         (layout_virtual_bases): Likewise.
1763         * decl.c (compute_array_index_type): Likewise.
1764         * mangle.c (write_mangled_name, write_prefix): Likewise.
1765         (write_template_prefix, write_integer_cst, write_expression): Likewise.
1766         (write_template_arg, write_array_type): Likewise.
1767         * method.c (lazily_declare_fn): Likewise.
1768         * rtti.c (get_pseudo_ti_index): Likewise.
1769         * typeck.c (comp_array_types): Likewise.
1771 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
1773         * vtable-class-hierarchy.c: Update handling for section names
1774         that are no longer trees.
1775         * decl.c (duplicate_decls): Likewise.
1777 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1779         PR c++/19200
1780         * parser.c (cp_parser_init_declarator): Actually pass friend_p
1781         to cp_parser_declarator.
1783 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1785         PR c++/60265
1786         * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1787         * name-lookup.c (validate_nonmember_using_decl): Adjust error
1788         message.
1790 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1792         PR c++/19200
1793         * parser.c (cp_parser_declarator): Add bool parameter.
1794         (cp_parser_direct_declarator): Likewise, use it.
1795         (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1796         (cp_parser_condition, cp_parser_explicit_instantiation,
1797         cp_parser_init_declarator, cp_parser_type_id_1,
1798         cp_parser_parameter_declaration, cp_parser_exception_declaration,
1799         cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1800         cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1801         Adjust.
1802         * decl.c (grokdeclarator): Fix handling of friend declared in
1803         namespace scope (g++.dg/parse/friend10.C).
1805 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
1807         * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1808         ->implicit_section.
1809         * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1810         (maybe_clone_body): Move symbol across comdat groups.
1811         * method.c (use_thunk): Copy implicit section flag.
1813 2014-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1815         PR c++/22556
1816         * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1818 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
1820         * method.c (use_thunk): Use set_decl_section_name.
1821         * optimize.c (maybe_clone_body): Use set_decl_section_name.
1822         * decl.c (duplicate_decls): Likewise.
1823         * vtable-class-hierarchy.c: Likewise.
1825 2014-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
1827         PR c++/60184
1828         * class.c (check_field_decls): In C++11 mode do not reject
1829         static data members and reference-type members in unions.
1831 2014-06-05  Jason Merrill  <jason@redhat.com>
1833         PR c++/43453
1834         * decl.c (check_initializer): Collapse a TREE_LIST here.
1835         * typeck2.c (store_init_value): Not here.
1837 2014-06-05  Richard Biener  <rguenther@suse.de>
1838             Paolo Carlini  <paolo.carlini@oracle.com>
1840         PR c++/56961
1841         * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1842         handling of empty classes.
1844 2014-06-04  Jason Merrill  <jason@redhat.com>
1846         * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1847         for noexcept and thread_local, too.
1849         PR c++/61343
1850         * decl.c (check_initializer): Maybe clear
1851         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1853 2014-06-05  Richard Biener  <rguenther@suse.de>
1855         PR c++/61004
1856         * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1857         warnings for accessing empty classes.
1859 2014-06-05  Marek Polacek  <polacek@redhat.com>
1861         PR c/49706
1862         * parser.c (cp_parser_binary_expression): Warn when logical not is
1863         used on the left hand side operand of a comparison.
1865 2014-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
1867         PR c++/43453
1868         * typeck.c (cp_build_modify_expr): Handle array of characters
1869         initialized by a string literal.
1870         * decl.c (check_initializer): Handle parenthesized string literal
1871         as initializer.
1872         * typeck2.c (store_init_value): Remove redundant check.
1874 2014-06-04  Jason Merrill  <jason@redhat.com>
1876         PR c++/51253
1877         PR c++/61382
1878         * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1879         * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1881 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
1883         PR c/58942
1884         * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1885         with a pointer.
1887 2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1889         DR 1423
1890         PR c++/52174
1891         * call.c (standard_conversion): Convert nullptr to bool only
1892         in case of direct-initialization.
1893         (convert_like_real): Provide informative error message.
1895 2014-06-03  Marek Polacek  <polacek@redhat.com>
1897         PR c/60439
1898         * semantics.c (finish_switch_cond): Warn if switch condition has
1899         boolean value.
1901 2014-06-03  Jason Merrill  <jason@redhat.com>
1903         PR c++/60992
1904         * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first.  Add a new
1905         variable to local_specializations.
1907         PR c++/60848
1908         * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1910 2014-06-02  Jason Merrill  <jason@redhat.com>
1912         PR c++/61046
1913         * decl.c (reshape_init_class): Handle un-folded
1914         constant-expressions.
1916         PR c++/61134
1917         * pt.c (pack_deducible_p): Handle canonicalization.
1919 2014-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1921         * pt.c (tsubst_function_type): Initialize arg_types.
1923 2014-06-02  Siva Chandra Reddy  <sivachandra@google.com>
1925         PR debug/57519
1926         * class.c (handle_using_decl): Pass the correct scope to
1927         cp_emit_debug_info_for_using.
1929 2014-06-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1931         PR c++/59483
1932         PR c++/61148
1933         * search.c (accessible_p): Use current_nonlambda_class_type.
1934         * semantics.c (check_accessibility_of_qualified_id): Likewise.
1936 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1938         * decl.c: Include builtins.h.
1939         * semantics.c: Likewise.
1941 2014-05-31  Paolo Carlini  <paolo.carlini@oracle.com>
1943         DR 1227
1944         PR c++/57543
1945         * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1946         * pt.c (tsubst_function_type): Inject the this parameter; do the
1947         substitutions in the order mandated by the DR.
1948         (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1949         * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1950         (static_fn_type): Copy it.
1951         * decl2.c (build_memfn_type, change_return_type,
1952         cp_reconstruct_complex_type): Likewise.
1953         * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1954         * tree.c (strip_typedefs): Likewise.
1955         * typeck.c (merge_types): Likewise.
1957 2014-05-30  Jason Merrill  <jason@redhat.com>
1959         PR c++/56947
1960         * pt.c (instantiate_decl): Check that defer_ok is not set for
1961         local class members.
1963         PR c++/60992
1964         * pt.c (tsubst_init): Split out from...
1965         (tsubst_expr) [DECL_EXPR]: Here.
1966         (tsubst_copy) [VAR_DECL]: Use it.
1967         * semantics.c (finish_id_expression): Return the decl for static/const.
1969 2014-05-28  Jason Merrill  <jason@redhat.com>
1971         PR c++/47202
1972         * decl.c (cxx_comdat_group): Return a decl.
1973         * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1975         * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1976         bound.
1978         PR c++/61242
1979         * call.c (build_aggr_conv): Ignore passed in flags.
1980         (build_array_conv, build_complex_conv): Likewise.
1982 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1984         * optimize.c (maybe_thunk_body): Use set_comdat_group.
1985         (maybe_clone_body): Likewise.
1986         * decl.c (duplicate_decls): Update code duplicating comdat group;
1987         do not copy symtab pointer; before freeing newdecl remove it
1988         from symtab.
1989         * decl2.c (constrain_visibility): Use set_comdat_group.
1991 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1993         * rtti.c: Include tm_p.h
1994         (emit_tinfo_decl): Force RTTI data to be aligned to required
1995         ABI alignment only.
1997 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1999         * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2000         ignoring other target adjustments.
2002 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
2004         * semantics.c (finish_omp_clauses): Remove duplicated variable
2005         initialization.
2007         * parser.c (cp_parser_omp_target): Return bool values.
2009 2014-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
2011         PR c++/61088
2012         * lambda.c (add_capture): Enforce that capture by value requires
2013         complete type.
2014         * typeck2.c (cxx_incomplete_type_inform): Early return if
2015         TYPE_MAIN_DECL is null.
2017 2014-05-21  Jonathan Wakely  <jwakely@redhat.com>
2019         PR c/61271
2020         * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2022 2014-05-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
2024         PR c++/61133
2025         * lambda.c (build_capture_proxy, add_capture): Treat normal
2026         captures and init-captures identically.
2028 2014-05-21  Mark Wielaard  <mjw@redhat.com>
2030         PR debug/16063
2031         * cp-lang.c (cxx_enum_underlying_base_type): New function.
2032         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2034 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
2036         * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2037         * cp-array-notation.c (replace_invariant_exprs): Likewise.
2038         (expand_array_notation): Handle VOID_CST.
2039         * error.c (dump_expr): Likewise.
2040         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2041         (cxx_pretty_printer::expression): Likewise.
2042         (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2043         * decl.c (register_dtor_fn): Likewise.
2044         * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2045         (build_delete, push_base_cleanups): Likewise.
2046         * mangle.c (write_expression): Likewise.
2047         * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2048         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2049         (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2050         * tree.c (cp_tree_equal): Likewise.
2051         (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2052         instead of void_zero_node.
2053         * typeck.c (check_return_expr): Likewise.
2054         * typeck2.c (build_functional_cast): Likewise.
2056 2014-05-21  Igor Zamyatin  <igor.zamyatin@intel.com>
2058         PR c/60189
2059         * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2060         from here to...
2061         (cp_parser_statement): ...here. Make sure only semicolon can go after
2062         Cilk_sync.
2064 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2066         PR c++/58753
2067         PR c++/58930
2068         PR c++/58704
2069         * typeck2.c (digest_nsdmi_init): New.
2070         * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2071         * init.c (get_nsdmi): Likewise.
2072         * cp-tree.h (digest_nsdmi_init): Declare.
2074 2014-05-20  Jason Merrill  <jason@redhat.com>
2076         * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2077         up a virtual function in a dummy object.
2079 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2081         PR c++/60373
2082         * decl.c (duplicate_decls): Replace pair of warning_at with
2083         warning_at + inform.
2084         (maybe_commonize_var): Likewise.
2086 2014-05-20  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
2088         PR bootstrap/61210
2089         * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2090         (tsubst_copy_and_build): Perform recursive substitutions in a
2091         deterministic order.
2093 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2095         PR c++/58664
2096         * typeck2.c (cxx_incomplete_type_inform): New.
2097         (cxx_incomplete_type_diagnostic): Use it.
2098         * decl.c (grokdeclarator): Check the element type of an
2099         incomplete array type; call the above.
2100         * cp-tree.h (cxx_incomplete_type_inform): Declare.
2102 2014-05-19  Jason Merrill  <jason@redhat.com>
2104         PR c++/58761
2105         * pt.c (tsubst_copy): Don't check at_function_scope_p.
2106         (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2108 2014-05-19  Paolo Carlini  <paolo.carlini@oracle.com>
2110         * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2111         * parser.c (cp_parser_enum_specifier): Likewise.
2113 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
2115         * class.c (sorted_fields_type_new): Adjust.
2116         * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2117         * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2118         * cp-tree.h: Remove usage of variable_size gty attribute.
2119         * decl.c (make_label_decl): Adjust.
2120         (check_goto): Likewise.
2121         (start_preparsed_function): Likewise.
2122         (save_function_data): Likewise.
2123         * lex.c (init_reswords): Likewise.
2124         (retrofit_lang_decl): Likewise.
2125         (cxx_dup_lang_specific_decl): Likewise.
2126         (copy_lang_type): Likewise.
2127         (cxx_make_type): Likewise.
2128         * name-lookup.c (binding_entry_make): Likewise.
2129         (binding_table_construct): Likewise.
2130         (binding_table_new): Likewise.
2131         (cxx_binding_make): Likewise.
2132         (pushdecl_maybe_friend_1): Likewise.
2133         (begin_scope): Likewise.
2134         (push_to_top_level): Likewise.
2135         * parser.c (cp_lexer_alloc): Likewise.
2136         (cp_lexer_new_from_tokens): Likewise.
2137         (cp_token_cache_new): Likewise.
2138         (cp_parser_context_new): Likewise.
2139         (cp_parser_new): Likewise.
2140         (cp_parser_nested_name_specifier_opt): Likewise.
2141         (cp_parser_template_id): Likewise.
2142         * pt.c (maybe_process_partial_specialization): Likewise.
2143         (register_specialization): Likewise.
2144         (add_pending_template): Likewise.
2145         (lookup_template_class_1): Likewise.
2146         (push_tinst_level): Likewise.
2147         * semantics.c (register_constexpr_fundef): Likewise.
2148         (cxx_eval_call_expression): Likewise.
2149         * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2151 2014-05-16  Paolo Carlini  <paolo.carlini@oracle.com>
2153         PR c++/51640
2154         * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2155         when cp_parser_lookup_name sets ambiguous_decls.
2157 2014-05-15  Jason Merrill  <jason@redhat.com>
2159         * call.c (print_conversion_rejection): Use loc consistently.
2161 2014-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
2163         * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2164         * call.c (convert_like_real, build_new_method_call_1): Use it.
2165         * decl2.c (grokfield): Likewise.
2166         * init.c (perform_member_init, build_aggr_init, expand_default_init,
2167         build_new_1): Likewise.
2168         * mangle.c (write_expression): Likewise.
2169         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2171 2014-05-14  Jason Merrill  <jason@redhat.com>
2173         PR c++/20332
2174         PR c++/21631
2175         * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2176         dropped cv-quals as a bad conversion.
2177         (convert_like_real) [ck_ref_bind]: Explain them.
2178         (compare_ics): Check badness before stripping reference
2179         bindings.  Handle comparing bad reference bindings.
2180         * typeck.c (comp_cv_qualification): Add overload that just takes
2181         integers.
2182         * cp-tree.h: Declare it.
2184         * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2185         (arg_conversion_rejection, bad_arg_conversion_rejection)
2186         (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2187         (add_function_candidate): Pass actual argument, rather than type, to
2188         bad_arg_conversion_rejection.
2189         (print_conversion_rejection): Explain what's wrong with the conversion.
2190         (print_z_candidates): Say "candidate:" before each candidate.
2191         (splice_viable): Be strict if we see a viable or template candidate.
2192         (build_user_type_conversion_1): Pass false to strict parameter.
2193         (perform_overload_resolution, build_conditional_expr_1): Likewise.
2194         (build_new_op_1, build_new_method_call_1): Likewise.
2195         (build_op_call_1): Pass true to strict parameter.
2197 2014-05-13  Jason Merrill  <jason@redhat.com>
2199         * call.c (print_error_for_call_failure): Say "no match" rather
2200         than "ambiguous" if there were no strict matches.
2201         (build_new_method_call_1): Likewise.
2203         PR c++/61151
2204         * semantics.c (is_this_parameter): Allow capture proxies too.
2206 2014-05-12  Jason Merrill  <jason@redhat.com>
2208         * call.c (maybe_print_user_conv_context): New.
2209         (convert_like_real): Use it.  Print call context for bad
2210         user-defined conversion.
2211         (build_over_call): Print call context for bad 'this' conversion.
2213         * call.c (convert_like_real): Use inform for identifying the
2214         declaration point.
2216 2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
2218         * cvt.c (cp_convert_to_pointer): Don't call error_at if
2219         complain & tf_error is false.
2221         * decl.c (make_unbound_class_template): Prefer inform for
2222         "declared here"-type message.
2224 2014-05-09  Momchil Velikov  <momchil.velikov@gmail.com>
2226         PR c++/60463
2227         PR c++/60755
2228         * lambda.c (lambda_expr_this_capture): Add new parameter
2229         add_capture_p controlling whether the functions will try to
2230         capture 'this' via the default capture.
2231         (maybe_resolve_dummy): Likewise.
2232         * cp-tree.h: Adjust prototypes.
2233         * call.c, semantics.c: Change callers of these functions.
2234         * call.c (build_new_method_call_1): Use the actual 'this' that
2235         would be potentially captured for the overload resolution, instead
2236         of the dummy object.
2238 2014-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
2240         * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2241         parameter.
2242         (convert_nontype_argument): Adjust calls.
2243         (coerce_template_parameter_pack): Add missing complain & tf_error
2244         check.
2246 2014-05-09  Jason Merrill  <jason@redhat.com>
2248         DR 587
2249         PR c++/51317
2250         * call.c (build_conditional_expr_1, conditional_conversion): Handle
2251         non-class lvalues and xvalues that differ only in cv-qualifiers.
2253         DR 5
2254         PR c++/60019
2255         * call.c (build_user_type_conversion_1): The copy-init temporary
2256         is cv-unqualified.
2258         PR c++/58714
2259         * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2261         PR c++/54348
2262         * call.c (build_conditional_expr_1): If overload resolution finds
2263         no match, just say "different types".
2265         PR c++/32019
2266         * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2268         PR c++/22434
2269         * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2270         if we didn't find a conversion.
2271         Don't accept a bad conversion too early.
2273 2014-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
2275         PR c++/13981
2276         * typeck.c (convert_for_assignment): Provide an inform for pointers
2277         to incomplete class types.
2279 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
2281         PR c++/61083
2282         * pt.c (convert_nontype_argument): Protect all the error calls
2283         with complain & tf_error.
2285 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
2287         PR c++/61080
2288         * pt.c (instantiate_decl): Avoid generating the body of a
2289         deleted function.
2291 2014-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
2293         PR c++/60999
2294         * pt.c (maybe_begin_member_template_processing): Use
2295         uses_template_parms.
2297 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2298             Mike Stump  <mikestump@comcast.net>
2299             Richard Sandiford  <rdsandiford@googlemail.com>
2301         * call.c: Include wide-int.h.
2302         (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2303         (convert_for_arg_passing): Likewise.
2304         * class.c: Include wide-int.h.
2305         (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2306         (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2307         (include_empty_classes): Likewise
2308         (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2309         * cvt.c: Include wide-int.h.
2310         (ignore_overflows): Use wide_int_to_tree.
2311         * decl.c: Include wide-int.h.
2312         (check_array_designated_initializer): Use wide-int interfaces.
2313         (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2314         (finish_enum_value_list): Use signop.
2315         (build_enumerator): Use wide-int interfaces.
2316         * init.c: Include wide-int.h.
2317         (build_new_1): Use wide-int interfaces.
2318         * mangle.c: Include wide-int.h.
2319         (write_integer_cst): Use wide-int interfaces.
2320         (write_array_type): Likewise.
2321         * tree.c: Include wide-int.h.
2322         (cp_tree_equal): Use tree_int_cst_equal.
2323         * typeck2.c: Include wide-int.h.
2324         (process_init_constructor_array): Use wide-int interfaces.
2326 2014-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
2328         PR c++/58582
2329         * decl.c (grokfndecl): Check duplicate_decls return value for
2330         error_mark_node.
2331         * pt.c (instantiate_decl): A deleted function is defined.
2333 2014-05-02  Jason Merrill  <jason@redhat.com>
2335         * decl2.c (vague_linkage_p): Local statics have vague linkage.
2337         PR c++/60992
2338         * lambda.c (lambda_capture_field_type): Wrap anything dependent
2339         other than 'this'.
2340         (add_capture): Check for VLA before calling it.
2341         * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2342         just the current one.  Make non-static.
2343         * cp-tree.h: Declare it.
2344         * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2345         the operand was static or constant.
2347 2014-05-02  Marek Polacek  <polacek@redhat.com>
2349         * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2350         warning_at calls.
2352 2014-05-01  Marek Polacek  <polacek@redhat.com>
2354         PR c/43395
2355         * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2356         between label and variable when warning about returning local address.
2358 2014-04-30  Jason Merrill  <jason@redhat.com>
2360         PR c++/60980
2361         * init.c (build_value_init): Don't try to call an array constructor.
2363         PR c++/60951
2364         * typeck2.c (massage_init_elt): Use maybe_constant_init.
2366 2014-04-30  Marek Polacek  <polacek@redhat.com>
2368         * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2369         even when SANITIZE_FLOAT_DIVIDE is on.  Set doing_div_or_mod even
2370         for non-integer types.
2372 2014-04-29  Jason Merrill  <jason@redhat.com>
2374         DR 1351
2375         Represent the unevaluated exception specification of an implicitly
2376         declared or deleted function with a simple placeholder, not a list
2377         of functions.
2378         * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2379         * except.c (unevaluated_noexcept_spec): New.
2380         * class.c (deduce_noexcept_on_destructor): Use it.
2381         * decl.c (check_redeclaration_exception_specification): Call
2382         maybe_instantiate_noexcept.
2383         (duplicate_decls): Call it before merge_types.
2384         (start_preparsed_function): Call maybe_instantiate_noexcept.
2385         * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2386         * init.c (get_nsdmi): Factor out of perform_member_init.
2387         * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2388         (walk_field_subobs): Consider NSDMI for EH spec.
2389         (get_defaulted_eh_spec): New.
2390         (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2391         (defaulted_late_check): Defer EH checking in non-template classes.
2392         (after_nsdmi_defaulted_late_checks): New.
2393         * parser.c (cp_parser_class_specifier_1): Use it.
2394         (unparsed_classes): New macro.
2395         * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2396         * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2397         Remove list-of-functions handling.
2398         * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2399         handling and FN parameter.
2400         * typeck.c (merge_types): Adjust.
2402 2014-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
2404         PR c++/59120
2405         * parser.c (cp_parser_alias_declaration): Check return value of
2406         cp_parser_require.
2408 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
2410         * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2411         atomic-clause, allow comma in between atomic-clause and
2412         seq_cst.
2414 2014-04-24  Marc Glisse  <marc.glisse@inria.fr>
2416         PR libstdc++/43622
2417         * rtti.c (emit_support_tinfos): Do not iterate on
2418         registered_builtin_types (partial revert).
2420 2014-04-23 Dinar Temirbulatov  <dtemirbulatov@gmail.com>
2422         PR c++/57958
2423         * semantics.c (apply_deduced_return_type): Complete non-void type
2424         before estimating whether the type is aggregate.
2426 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
2428         PR libstdc++/43622
2429         * rtti.c (emit_support_tinfo_1): New function, extracted from
2430         emit_support_tinfos.
2431         (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2433 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
2435         PR c/59073
2436         * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2437         fails, don't set OM_PARALLEL_COMBINED and return NULL.
2439 2014-04-18  Jason Merrill  <jason@redhat.com>
2441         DR 1571
2442         * call.c (reference_binding): Recurse on user-defined conversion.
2444         PR c++/60872
2445         * call.c (standard_conversion): Don't try to apply restrict to void.
2447 2014-04-16  Marc Glisse  <marc.glisse@inria.fr>
2449         * decl.c (reshape_init_r): Handle a single element of vector type.
2451 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
2453         PR c++/60765
2454         * decl2.c (cplus_decl_attributes): Handle
2455         pointer-to-member-function declarations.
2457 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
2459         PR c++/60764
2460         * call.c (build_user_type_coversion): Use build_dummy_object
2461         to create the placeholder object for a constructor method call.
2462         (build_special_member_call): Likewise.
2463         (build_over_call): Check for the placeholder object with
2464         is_dummy_object.
2465         (build_new_method_call_1): Likewise.  Don't attempt to resolve
2466         a dummy object for a constructor method call.
2468 2014-04-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
2470         PR c++/59295
2471         * friend.c (add_friend, make_friend_class): Move repeated friend
2472         warning under Wredundant_decls.
2474 2014-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
2476         * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2477         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2478         (do_class_using_decl): Likewise.
2479         * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2481 2014-04-15  Jakub Jelinek  <jakub@redhat.com>
2483         PR plugins/59335
2484         * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2486 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2488         * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2490 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2492         * pt.c (mark_template_parm): Use template_parm_level_and_index.
2494 2014-04-11  Jason Merrill  <jason@redhat.com>
2496         * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2497         * parser.c: Adjust.
2498         (cp_lexer_get_preprocessor_token): Always clear it.
2499         (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2501         DR 1467
2502         PR c++/51747
2503         * decl.c (reshape_init_r): Handle a single element of class type.
2505         DR 1338
2506         * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2507         built-in operator new.
2509 2014-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2511         PR c++/58600
2512         * name-lookup.c (parse_using_directive): Return early if the
2513         attribs argument is error_mark_node; use get_attribute_name.
2515 2014-04-11  Jason Merrill  <jason@redhat.com>
2517         DR 1030
2518         PR c++/51253
2519         * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2520         * call.c (struct z_candidate): Add flags field.
2521         (add_candidate): Add flags parm.
2522         (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2523         (add_template_candidate_real): Pass it.
2524         (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2525         * tree.c (build_aggr_init_expr): Copy it.
2526         * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2528 2014-04-10  Richard Biener  <rguenther@suse.de>
2529             Jakub Jelinek  <jakub@redhat.com>
2531         PR ipa/60761
2532         * error.c (dump_decl) <case FUNCTION_DECL>: If
2533         DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2534         recurse on DECL_ABSTRACT_ORIGIN instead of printing
2535         <built-in>.
2537 2014-04-09  Fabien Chêne  <fabien@gcc.gnu.org>
2539         * pt.c (check_template_variable): Check for the return of pedwarn
2540         before emitting a note.
2541         * parser.c (cp_parser_lambda_introducer): Likewise.
2543 2014-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
2545         PR c++/59115
2546         * pt.c (process_template_parm): For an invalid non-type parameter
2547         only set TREE_TYPE to error_mark_node.
2548         (push_inline_template_parms_recursive, comp_template_parms,
2549         redeclare_class_template, coerce_template_template_parm,
2550         coerce_template_template_parms, unify): Use error_operand_p.
2552 2014-04-08  Nathan Sidwell  <nathan@codesourcery.com>
2554         * class.c (check_bases_and_members): Warn about non-virtual dtors
2555         in public bases only.  Check warn_ecpp before complaining about
2556         non-polymorphic bases.
2558 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2560         * decl.c (duplicate_decls): Check for the return of warning_at
2561         before emitting a note.
2562         (warn_misplaced_attr_for_class_type): Likewise.
2563         (check_tag_decl): Likewise.
2565 2014-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
2567         PR c++/58207
2568         * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2570 2014-04-04  Patrick Palka  <patrick@parcs.ath.cx>
2572         PR c++/44613
2573         * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2574         * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2575         instantiating a variable-sized type.
2577         PR c++/21113
2578         * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2580 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2582         * class.c (find_abi_tags_r): Check for the return of warning
2583         before emitting a note.
2584         (one_inherited_ctor): Likewise.
2586 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2588         * decl.c (duplicate_decls): Check for the return of permerror
2589         before emitting a note.
2591 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
2593         * class.c (accessible_nvdtor_p): New.
2594         (check_bases): Don't check base destructor here ...
2595         (check_bases_and_members): ... check them here.  Trigger on
2596         Wnon-virtual-dtor flag.
2597         (finish_struct_1): Use accessible_nvdtor_p.
2599 2014-04-01  Jason Merrill  <jason@redhat.com>
2601         * pt.c (process_partial_specialization): Say "not deducible"
2602         rather than "not used".  Use inform.
2604         PR c++/60374
2605         * pt.c (coerce_template_parms): Check that the pack expansion
2606         pattern works with the first matching parameter.
2608 2014-04-01  Fabien Chêne  <fabien@gcc.gnu.org>
2610         * init.c (perform_member_init): Homogenize uninitialized
2611         diagnostics.
2613 2014-04-01  Jason Merrill  <jason@redhat.com>
2615         PR c++/60708
2616         * call.c (build_array_conv): Call complete_type.
2618         PR c++/60713
2619         * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2620         (picflag_from_initializer): Return it.
2621         (process_init_constructor): Handle it.
2623         PR c++/60642
2624         * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2625         * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2626         * pt.c (get_template_info): Handle NAMESPACE_DECL.
2627         (most_general_template): Handle more kinds of template.
2628         * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2629         instantiations and specializations.
2631 2014-03-31  Patrick Palka  <patrick@parcs.ath.cx>
2633         PR c++/44859
2634         * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2635         COMPONENT_REFs and ARRAY_REFs sooner.
2637 2014-03-29  Adam Butcher  <adam@jessamine.co.uk>
2639         PR c++/60626
2640         * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2641         usage in non-functions with pushed scope.
2643 2014-03-28  Adam Butcher  <adam@jessamine.co.uk>
2645         PR c++/60573
2646         * name-lookup.h (cp_binding_level): New transient field defining_class_p
2647         to indicate whether a scope is in the process of defining a class.
2648         * semantics.c (begin_class_definition): Set defining_class_p.
2649         * name-lookup.c (leave_scope): Reset defining_class_p.
2650         * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2651         defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2652         unwinding to class-defining scope to handle the erroneous definition of
2653         a generic function of an arbitrarily nested class within an enclosing
2654         class.
2656 2014-03-26  Fabien Chêne  <fabien@gcc.gnu.org>
2658         PR c++/52369
2659         * method.c (walk_field_subobs): Improve the diagnostic
2660         locations for both REFERENCE_TYPEs and non-static const members.
2661         * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2662         instead of %qD to be consistent with the c++11 diagnostic.
2664 2014-03-25  Jason Merrill  <jason@redhat.com>
2666         PR c++/60566
2667         PR c++/58678
2668         * class.c (build_vtbl_initializer): Handle abstract dtors here.
2669         * search.c (get_pure_virtuals): Not here.
2671         PR c++/60375
2672         * parser.c (cp_parser_lambda_expression): Don't parse the body of
2673         a lambda in unevaluated context.
2675         PR c++/60628
2676         * decl.c (create_array_type_for_decl): Complain about array of auto.
2678 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
2680         PR c++/60331
2681         * semantics.c (potential_constant_expression_1): Handle
2682         DECL_EXPR.
2684 2014-03-24  Adam Butcher  <adam@jessamine.co.uk>
2686         PR c++/60627
2687         * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2688         introducing an implicit function template parameter within an explicit
2689         instantiation.
2691 2014-03-22  Jason Merrill  <jason@redhat.com>
2693         PR c++/60574
2694         * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2695         to error.
2697 2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
2699         PR c++/60384
2700         * name-lookup.c (push_class_level_binding_1): Check identifier_p
2701         on the name argument.
2703 2014-03-20  Jakub Jelinek  <jakub@redhat.com>
2705         PR c++/60572
2706         * init.c (build_zero_init_1): Ignore fields with error_mark_node
2707         type.
2709 2014-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
2711         PR c++/51474
2712         * call.c (build_new_method_call_1): Handle pure virtuals called by
2713         NSDMIs too.
2715 2014-03-17  Adam Butcher  <adam@jessamine.co.uk>
2717         PR c++/60390
2718         * parser.c (cp_parser_member_declaration): Don't allow
2719         finish_fully_implicit_template to consider friend declarations to be
2720         class member templates.
2721         (synthesize_implicit_template_parm): Handling winding back through class
2722         scope to the class being defined in order to inject a template argument
2723         list.
2725         PR c++/60391
2726         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2727         function scope as per cp_parser_skip_to_end_of_statement.
2729 2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
2731         PR c++/59571
2732         * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2734 2014-03-14  Jason Merrill  <jason@redhat.com>
2736         PR c++/60532
2737         PR c++/58678
2738         * search.c (get_pure_virtuals): Handle abstract dtor here.
2739         (dfs_get_pure_virtuals): Not here.
2741         PR c++/58678
2742         * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2743         abstract class as pure.
2745 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2747         PR c++/60383
2748         * pt.c (maybe_process_partial_specialization): Check return value
2749         of check_specialization_namespace.
2751 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2753         PR c++/60254
2754         * semantics.c (finish_static_assert): Call cxx_constant_value only
2755         if require_potential_rvalue_constant_expression returns true.
2757 2014-03-11  Paolo Carlini  <paolo.carlini@oracle.com>
2759         PR c++/60389
2760         * method.c (get_inherited_ctor): New.
2761         * cp-tree.h (get_inherited_ctor): Declare it.
2762         * semantics.c (is_valid_constexpr_fn): Use it.
2764 2014-03-10  Jason Merrill  <jason@redhat.com>
2766         PR c++/60367
2767         * call.c (convert_default_arg): Remove special handling for
2768         CONSTRUCTOR.
2770         PR c++/53492
2771         * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2772         when deciding whether to call push_template_decl for a member class.
2773         * pt.c (push_template_decl_real): Return after wrong levels error.
2775 2014-03-08  Adam Butcher  <adam@jessamine.co.uk>
2777         PR c++/60033
2778         * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2779         lambda, remove the lambda's own template argument list prior to fetching
2780         the specialization.
2782         PR c++/60393
2783         * parser.c (cp_parser_parameter_declaration_clause): Move generic
2784         function template unwinding on error into a more general location, ...
2785         (cp_parser_skip_to_end_of_statement): ... here.
2787 2014-03-07  Jason Merrill  <jason@redhat.com>
2789         * Make-lang.in (check_g++_parallelize): Split dg.exp.
2791         * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2792         we're in a trailing return type.
2794         * typeck.c (comp_template_parms_position): 'auto' and
2795         'decltype(auto)' are different from real template parms.
2797         * parser.c (cp_parser_using_declaration): Consume the semicolon
2798         after bare parameter pack error.
2800         * cp-tree.h (REF_PARENTHESIZED_P): New.
2801         * semantics.c (force_paren_expr): Set it.
2802         * pt.c (do_auto_deduction): Check it.
2803         (tsubst) [COMPONENT_REF]: Copy it.
2804         * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2806         * decl.c (create_array_type_for_decl): Only warn about invalid
2807         C++1y VLA if flag_iso or warn_vla>0.
2808         (grokdeclarator): Likewise.
2809         * pt.c (tsubst): Likewise.
2810         * semantics.c (finish_decltype_type): Likewise.
2811         * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2812         (cp_build_addr_expr_1): Likewise.
2813         * init.c (build_new_1): Improve diagnostics.
2815 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2817         PR c++/58609
2818         * decl.c (check_initializer): Return NULL_TREE after error;
2819         consistently use inform.
2821 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2823         * decl.c (check_initializer): Remove dead code.
2825 2014-03-06  Marek Polacek  <polacek@redhat.com>
2827         PR c/60197
2828         * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2829         of checking tree code.
2831 2014-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2833         * parser.c (cp_lexer_set_source_position): New.
2834         (cp_parser_mem_initializer): Use it.
2835         (cp_parser_postfix_open_square_expression): Likewise.
2836         (cp_parser_parenthesized_expression_list): Likewise.
2837         (cp_parser_new_initializer): Likewise.
2838         (cp_parser_jump_statement): Likewise.
2839         (cp_parser_initializer): Likewise.
2840         (cp_parser_functional_cast): Likewise.
2842 2014-03-05  Jason Merrill  <jason@redhat.com>
2844         PR c++/60409
2845         * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2846         dependent expression.
2848         PR c++/60361
2849         * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2850         if re-parsing might succeed.
2851         * semantics.c (finish_id_expression): Use of a parameter outside
2852         the function body is a parse error.
2854         * parser.c (cp_parser_mem_initializer): Set input_location
2855         properly for init-list warning.
2856         (cp_parser_postfix_open_square_expression): Likewise.
2857         (cp_parser_parenthesized_expression_list): Likewise.
2858         (cp_parser_new_initializer): Likewise.
2859         (cp_parser_jump_statement): Likewise.
2860         (cp_parser_initializer): Likewise.
2861         (cp_parser_functional_cast): Likewise.
2863 2014-03-04  Jason Merrill  <jason@redhat.com>
2865         PR c++/60417
2866         * typeck2.c (process_init_constructor_record): Set
2867         CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2869         PR c++/60415
2870         PR c++/54359
2871         * parser.c (cp_parser_direct_declarator): Set declarator to
2872         cp_error_declarator on invalid qualified-id.
2874 2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
2876         PR c++/60376
2877         * parser.c (cp_parser_using_declaration): Early return when
2878         cp_parser_nested_name_specifier errors out.
2880 2014-03-01  Adam Butcher  <adam@jessamine.co.uk>
2882         PR c++/60377
2883         * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2884         function scope on parse error in function parameter list.
2886 2014-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
2888         * method.c (implicitly_declare_fn): Remove redundant
2889         DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2890         * semantics.c (is_instantiation_of_constexpr): Likewise.
2891         * error.c (dump_function_decl): Likewise.
2893 2014-03-01  Jason Merrill  <jason@redhat.com>
2895         PR c++/60379
2896         * semantics.c (begin_maybe_infinite_loop): Use
2897         fold_non_dependent_expr_sfinae.
2899 2014-02-28  Jason Merrill  <jason@redhat.com>
2901         PR c++/58845
2902         * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2904 2014-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
2906         PR c++/58610
2907         * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2908         * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2909         * lambda.c (maybe_add_lambda_conv_op): Likewise.
2911 2014-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
2913         PR c++/60253
2914         * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2915         error_at.
2917 2014-02-27  Jason Merrill  <jason@redhat.com>
2919         PR c++/60353
2920         PR c++/55877
2921         * decl2.c (tentative_decl_linkage): Don't mess with functions that
2922         are not yet defined.
2924 2014-02-26  Jason Merrill  <jason@redhat.com>
2926         PR c++/60347
2927         PR lto/53808
2928         * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2929         * init.c (build_vtbl_address): Do it here.
2931         PR c++/59231
2932         PR c++/11586
2933         PR c++/14710
2934         PR c++/57132
2935         * pt.c (struct warning_sentinel): New.
2936         (tsubst_copy_and_build): Use it instead of
2937         c_inhibit_evaluation_warnings.
2938         * typeck.c (maybe_warn_about_useless_cast): Remove
2939         c_inhibit_evaluation_warnings check.
2941         PR c++/54440
2942         * pt.c (get_template_parm_index): New.
2943         (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2944         (process_template_parm): Allow bare packs in template template
2945         parm template parms.
2946         (coerce_template_parameter_pack): Handle fixed template template
2947         parm packs and fixed packs not at the end of the parm list.
2948         (coerce_template_parms): Handle template parm packs not at the end
2949         of the parm list.
2950         (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2952         PR c++/60182
2953         * pt.c (unify): Ignore alias templates when deducing a template
2954         template parameter.
2956         PR c++/60345
2957         Revert:
2958         DR 1571
2959         * call.c (reference_binding): Recurse on user-defined conversion.
2960         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2962 2014-02-25  Jason Merrill  <jason@redhat.com>
2964         DR 1571
2965         * call.c (reference_binding): Recurse on user-defined conversion.
2966         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2968         * call.c (print_conversion_rejection): Handle n_arg of -2.
2969         (build_user_type_conversion_1): Pass it.
2971         PR c++/55877
2972         * decl2.c (no_linkage_error): Handle C++98 semantics.
2973         (reset_type_linkage): Move from decl.c.
2974         (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2975         (bt_reset_linkage_2, reset_decl_linkage): New.
2976         (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2977         (cp_write_global_declarations): Move condition into no_linkage_error.
2978         * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2979         * semantics.c (expand_or_defer_fn_1): Factor out
2980         tentative_decl_linkage.
2981         * cp-tree.h: Adjust.
2983         * decl2.c (finish_static_data_member_decl): Diagnose static data
2984         member in unnamed class.
2985         * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2987         PR lto/53808
2988         * class.c (clone_function_decl): Call note_vague_linkage_fn for
2989         defaulted virtual dtor.
2991         DR 1286
2992         PR c++/60328
2993         * pt.c (get_underlying_template): Fix equivalence calculation.
2995 2014-02-25  Adam Butcher  <adam@jessamine.co.uk>
2997         PR c++/60311
2998         * parser.c (function_being_declared_is_template_p): Return false when
2999         processing a template parameter list.
3000         (cp_parser_parameter_declaration_clause): Don't set
3001         auto_is_implicit_function_template_parm_p when processing a
3002         template parameter list.
3004         * parser.c (synthesize_implicit_template_parm): Inject new template
3005         argument list appropriately when a generic member function
3006         of a class template is declared out-of-line.
3008         PR c++/60065
3009         * parser.c (cp_parser_direct_declarator): Don't save and
3010         restore num_template_parameter_lists around call to
3011         cp_parser_parameter_declaration_list.
3012         (function_being_declared_is_template_p): New predicate.
3013         (cp_parser_parameter_declaration_list): Use
3014         function_being_declared_is_template_p as predicate for
3015         inspecting current function template parameter list length
3016         rather than num_template_parameter_lists.
3018 2014-02-24  Jason Merrill  <jason@redhat.com>
3020         PR c++/60146
3021         * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3022         DECL_EXPR initialize a non-class iterator.
3024         PR c++/60312
3025         * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3027 2014-02-21  Jason Merrill  <jason@redhat.com>
3029         PR c++/58170
3030         * parser.c (cp_parser_type_name): Always check dependency.
3031         (cp_parser_type_specifier_seq): Call
3032         cp_parser_parse_and_diagnose_invalid_type_name.
3034         PR c++/60108
3035         * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3037         PR c++/60185
3038         * parser.c (cp_parser_default_argument): Clear
3039         current_class_ptr/current_class_ref like tsubst_default_argument.
3041         PR c++/60252
3042         * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3043         than current_binding_level.
3045         PR c++/60186
3046         * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3048         PR c++/60187
3049         * parser.c (cp_parser_enum_specifier): Call
3050         check_for_bare_parameter_packs.
3052         PR c++/59347
3053         * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3054         erroneous typedef.
3056         PR c++/60241
3057         * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3058         of the partial instantiation, not the most general template.
3059         (maybe_process_partial_specialization): Reassign everything on
3060         that list.
3062         PR c++/60216
3063         * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3064         (check_explicit_specialization): Don't clone.
3066         PR c++/60219
3067         * pt.c (coerce_template_parms): Bail if argument packing fails.
3069         PR c++/60224
3070         * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3071         Don't get confused by a CONSTRUCTOR that already has a type.
3073         PR c++/60227
3074         * call.c (build_array_conv): Don't crash on VLA.
3076         PR c++/60248
3077         * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3079         PR c++/60252
3080         * lambda.c (maybe_resolve_dummy): Don't try to capture this
3081         in declaration context.
3083         DR 1591
3084         PR c++/60051
3085         * pt.c (unify): Only unify if deducible.  Handle 0-length list.
3087         PR c++/60250
3088         * parser.c (cp_parser_direct_declarator): Don't wrap a
3089         type-dependent expression in a NOP_EXPR.
3091         PR c++/60251
3092         * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3094         PR c++/60167
3095         PR c++/60222
3096         PR c++/58606
3097         * parser.c (cp_parser_template_argument): Restore dereference.
3098         * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3099         (process_partial_specialization): Handle deref.
3100         (unify): Likewise.
3102 2014-02-21  Adam Butcher  <adam@jessamine.co.uk>
3104         PR c++/60052
3105         PR c++/60053
3106         * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3107         implicit_template_scope upon leaving an out-of-line generic member
3108         function definition.
3110 2014-02-20  Kai Tietz  <ktietz@redhat.com>
3112         PR c++/58873
3113         * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3114         valued type argument as error_mark_node.
3116         PR c++/58835
3117         * semantics.c (finish_fname): Handle error_mark_node.
3119 2014-02-19  Jason Merrill  <jason@redhat.com>
3121         PR c++/60046
3122         * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3123         spec from template context.
3125 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
3127         PR debug/56563
3128         * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3129         FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3131         PR c++/60267
3132         * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3134 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
3136         PR c++/60225
3137         * semantics.c (ensure_literal_type_for_constexpr_object): Use
3138         strip_array_types.
3140 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
3142         PR c++/60215
3143         * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3144         During error recovery allow_non_constant may be false.
3146 2014-02-18  Adam Butcher  <adam@jessamine.co.uk>
3148         PR c++/60190
3149         * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3150         scope whenever a template parameter list has been started, independent
3151         of whether the function call operator was well-formed or not.
3153         PR c++/60064
3154         * parser.c (cp_parser_member_declaration): Pop fully implicit template
3155         scope for generic friend declarations as well as for non-friends.
3157 2014-02-12  Paolo Carlini  <paolo.carlini@oracle.com>
3159         PR c++/60047
3160         * method.c (implicitly_declare_fn): A constructor of a class with
3161         virtual base classes isn't constexpr (7.1.5p4).
3163 2014-02-05  Jan Hubicka  <hubicka@ucw.cz
3165         * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3167 2014-02-05  Jakub Jelinek  <jakub@redhat.com>
3169         PR c++/58703
3170         * parser.c (cp_parser_omp_declare_reduction): Save and free
3171         declarator_obstack.
3173 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
3175         PR c++/53017
3176         PR c++/59211
3177         * tree.c (handle_init_priority_attribute): Call default_conversion on
3178         the attribute argument.
3180 2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
3182         PR c++/58871
3183         * method.c (synthesized_method_walk): If vbases is non-null but
3184         is_empty is true, likewise don't worry about the virtual bases.
3186 2014-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
3188         PR c++/51219
3189         * typeck2.c (process_init_constructor_record): Just skip unnamed
3190         bit-fields.
3192 2014-01-31  Jason Merrill  <jason@redhat.com>
3194         PR c++/59469
3195         * pt.c (mark_decl_instantiated): Call mark_needed.
3197         PR c++/58672
3198         * decl2.c (handle_tls_init): Handle null init fn.
3200         PR c++/55800
3201         * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3203 2014-01-31  Paolo Carlini  <paolo.carlini@oracle.com>
3205         PR c++/59082
3206         * class.c (build_vfield_ref): Early return error_mark_node if
3207         TYPE_VFIELD (type) is null.
3208         (build_base_path): Check return value of build_vfield_ref.
3210 2014-01-31  Jason Merrill  <jason@redhat.com>
3212         PR c++/59646
3213         * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3214         [ck_list]: Check for error_mark_node.
3215         (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3217         PR c++/57043
3218         * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3219         during partial ordering.
3221 2014-01-31  Marek Polacek  <polacek@redhat.com>
3223         PR c/59963
3224         * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3226 2014-01-30  Jason Merrill  <jason@redhat.com>
3228         PR c++/57899
3229         * cp-tree.h (struct saved_scope): Add x_local_specializations.
3230         (local_specializations): New macro.
3231         * pt.c (local_specializations): Remove variable.
3233 2014-01-30  Richard Sandiford  <rdsandiford@googlemail.com>
3235         PR c++/58708
3236         * parser.c (make_string_pack): Use double_int::from_buffer.
3238 2014-01-30  Marek Polacek  <polacek@redhat.com>
3240         PR c/59940
3241         * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3242         input_location.
3243         * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3244         with input_location.
3245         * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3246         loc parameter.
3248 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3250         PR c++/58843
3251         * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3253 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3255         PR c++/58649
3256         * pt.c (lookup_template_class_1): Check start_enum return value
3257         for error_mark_node.
3259 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3261         * decl.c (duplicate_decls, typename_hash, typename_compare):
3262         Use TYPE_IDENTIFIER.
3263         * error.c (dump_type): Likewise.
3264         * mangle.c (dump_substitution_candidates): Likewise.
3266 2014-01-30  Jason Merrill  <jason@redhat.com>
3268         PR c++/59633
3269         * decl2.c (attributes_naming_typedef_ok): New.
3270         * cp-tree.h: Declare it.
3271         * decl.c (grokdeclarator): Check it.
3272         * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3274 2014-01-29  Jason Merrill  <jason@redhat.com>
3276         PR c++/59707
3277         * call.c (add_builtin_candidate): Catch dependent types.
3279         PR c++/59989
3280         * pt.c (expand_template_argument_pack): Correct
3281         non_default_args_count calculation.
3283         PR c++/58466
3284         * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3286         PR c++/59956
3287         * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3288         have a friend template in a class template.
3289         * pt.c (tsubst_friend_function): Look through it.
3290         (push_template_decl_real): A friend member template is
3291         primary.
3293 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3295         PR c++/58846
3296         * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3297         == error_mark_node.
3299 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3301         PR c++/58674
3302         * pt.c (instantiate_template_1): Check for error_mark_node the second
3303         argument too.
3305 2014-01-29  Jason Merrill  <jason@redhat.com>
3307         PR c++/59916
3308         * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3309         cdtor_returns_this case.
3311         PR c++/59315
3312         * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3314 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3316         PR c++/58702
3317         * semantics.c (finish_omp_reduction_clause): Check type for
3318         error_mark_node.
3320 2014-01-28  Jason Merrill  <jason@redhat.com>
3322         PR c++/59791
3323         * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3324         (tsubst_copy): Use it if lookup fails.
3326         PR c++/59818
3327         * pt.c (tsubst_function_type): Make sure we keep the same function
3328         quals.
3330         PR c++/58701
3331         * semantics.c (build_anon_member_initialization): Stop walking
3332         when we run out of COMPONENT_REFs.
3334         PR c++/58632
3335         * decl.c (lookup_and_check_tag): Ignore template parameters if
3336         scope == ts_current.
3337         * pt.c (check_template_shadow): Don't complain about the injected
3338         class name.
3340         * decl.c (duplicate_decls): Tweak.
3342         PR c++/53756
3343         * mangle.c (write_unqualified_name): Handle operator auto.
3345 2014-01-27  Jason Merrill  <jason@redhat.com>
3347         PR c++/59823
3348         Core DR 1138
3349         * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3350         list-initialization.  A conversion to rvalue ref that involves
3351         an lvalue-rvalue conversion is bad.
3352         (convert_like_real): Give helpful error message.
3354         PR c++/54652
3355         * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3357         PR c++/58504
3358         * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3359         types.
3361         PR c++/58606
3362         * pt.c (template_parm_to_arg): Call convert_from_reference.
3363         (tsubst_template_arg): Don't strip reference refs.
3365         PR c++/58639
3366         * call.c (build_aggr_conv): Reject value-initialization of reference.
3368         PR c++/58812
3369         PR c++/58651
3370         * call.c (convert_like_real): Give helpful error about excess braces
3371         for ck_rvalue of scalar type.
3373         Core DR 1288
3374         * call.c (reference_binding): Only elide braces if the single
3375         element is reference-related.
3377         PR c++/58814
3378         * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3379         stabilizing.
3381         PR c++/58837
3382         * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3383         FUNCTION_DECL.
3385         PR c++/59097
3386         * decl.c (compute_array_index_type): Don't call
3387         maybe_constant_value for a non-integral expression.
3389 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3391         * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3392         flag_cilkplus.
3393         * cp-gimplify.c (cp_genericize): Likewise.
3394         * decl.c (grokfndecl): Likewise.
3395         * parser.c (cp_parser_postfix_expression): Likewise.
3396         (cp_parser_postfix_open_square_expression): Likewise.
3397         (cp_parser_direct_declarator): Likewise.
3398         (is_cilkplus_vector_p): Likewise.
3399         (cp_parser_omp_clause_name): Likewise.
3400         (cp_parser_omp_all_clauses): Likewise.
3401         * pt.c (apply_late_template_attributes): Likewise.
3402         * typeck.c (cp_build_array_ref): Likewise.
3403         (cp_build_compound_expr): Likewise.
3404         (check_return_expr): Likewise.
3406 2014-01-24  Jason Merrill  <jason@redhat.com>
3408         PR c++/58550
3409         * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3410         c++11 into error.
3412         PR c++/59886
3413         PR c++/59659
3414         * typeck2.c (process_init_constructor_array): Don't create
3415         RANGE_EXPR yet.
3417 2014-01-24  Jakub Jelinek  <jakub@redhat.com>
3419         * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3420         handling for RANGE_ARRAY case.
3422 2014-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
3424         PR c++/57524
3425         * name-lookup.c (push_using_directive): Use timevar_cond_start.
3427 2014-01-23  Marek Polacek  <polacek@redhat.com>
3429         PR c/59846
3430         * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3432 2014-01-23  Marek Polacek  <polacek@redhat.com>
3434         PR c/58346
3435         * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3436         an empty aggregate.
3438 2014-01-23  Jason Merrill  <jason@redhat.com>
3440         PR c++/55189
3441         * cp-tree.h (struct language_function): Add infinite_loop and
3442         infinite_loops.
3443         (current_function_infinite_loop): New.
3444         * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3445         (break_maybe_infinite_loop): New.
3446         (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3447         (finish_do_stmt, finish_for_cond, finish_for_stmt)
3448         (begin_range_for_stmt): Use them.
3449         * decl.c (finish_function): Don't warn about missing return
3450         if current_function_infinite_loop.
3451         * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3452         * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3454         * call.c (build_op_delete_call): Use make_tree_vector and
3455         release_tree_vector.
3457 2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
3459         PR c++/58980
3460         * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3461         nested_name_specifier.
3463 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3465         * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3466         see if there is an attribute after function decl.  If so, then
3467         parse them now.
3468         (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3469         enabled function late parsing.
3470         (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3471         attribute for a SIMD-enabled function.
3472         (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3473         the function is used by SIMD-enabled function (indicated by NULL
3474         pragma token).   Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3475         PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3476         (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3477         vectorlength clause in SIMD-enabled function and #pragma SIMD's
3478         vectorlength clause.  Added a new bool parameter to differentiate
3479         between the two.
3480         (cp_parser_cilk_simd_fn_vector_attrs): New function.
3481         (is_cilkplus_vector_p): Likewise.
3482         (cp_parser_late_parsing_elem_fn_info): Likewise.
3483         (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3484         and "vectorlength" clauses when Cilk Plus is enabled.
3485         (cp_parser_omp_clause_linear): Added a new parameter of type bool
3486         and emit a sorry message when step size is a parameter.
3487         * parser.h (cp_parser::cilk_simd_fn_info): New field.
3488         * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3489         flag_openmp.
3490         * pt.c (apply_late_template_attributes): Likewise.
3492 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3494         PR middle-end/58809
3495         * semantics.c (finish_omp_reduction_clause): Reject
3496         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3498 2014-01-22  Ville Voutilainen  <ville.voutilainen@gmail.com>
3500         PR c++/59482
3501         * parser.c (cp_parser_class_head): Push the class before parsing
3502         the base-clause, pop after it.
3504 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
3506         * decl2.c (cpp_check): Revert prototype change.
3508 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
3510         PR c++/59270
3511         PR c++/58811
3512         * init.c (build_value_init_noctor): Don't pass error_mark_node to
3513         build_value_init.
3515 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
3517         PR c++/59269
3518         * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3519         only when errorcount == 0.
3521 2014-01-17  Marek Polacek  <polacek@redhat.com>
3523         PR c++/59838
3524         * cvt.c (ocp_convert): Don't segfault on non-existing
3525         ENUM_UNDERLYING_TYPE.
3527 2014-01-16  Jason Merrill  <jason@redhat.com>
3529         PR c++/59821
3530         * tree.c (bot_manip): Update the location of builtin_LINE and
3531         builtin_FILE calls.
3533 2014-01-14  Jason Merrill  <jason@redhat.com>
3535         PR c++/59659
3536         * typeck2.c (massage_init_elt): New.
3537         (process_init_constructor_record)
3538         (process_init_constructor_union): Use it.
3539         (process_init_constructor_array): Use it.  Use RANGE_EXPR.
3540         (split_nonconstant_init_1): Handle it.
3541         * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3543 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3545         PR c++/59631
3546         * parser.c (cp_parser_postfix_expression): Added a new if-statement
3547         and replaced an existing if-statement with else-if statement.
3548         Changed an existing error message wording to match the one from the C
3549         parser.
3551 2014-01-08  Jason Merrill  <jason@redhat.com>
3553         PR c++/59614
3554         * class.c (abi_tag_data): Add tags field.
3555         (check_abi_tags): Initialize it.
3556         (find_abi_tags_r): Support collecting missing tags.
3557         (mark_type_abi_tags): Don't look at template args.
3558         (inherit_targ_abi_tags): New.
3559         (check_bases_and_members): Use it.
3560         * cp-tree.h (ABI_TAG_IMPLICIT): New.
3561         * mangle.c (write_abi_tags): Check it.
3563 2014-01-07  Jason Merrill  <jason@redhat.com>
3565         PR c++/58856
3566         * pt.c (num_innermost_template_parms): New.
3567         (get_underlying_template): Use it.
3569         PR c++/58965
3570         * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3572 2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
3574         * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3575         the letter of 20.11.6 about Base and Derived naming the same
3576         class type modulo cv-qualifiers.
3578 2014-01-06  Adam Butcher  <adam@jessamine.co.uk>
3580         PR c++/59635
3581         * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3582         function as unimplemented for generic lambdas with varargs.
3584         PR c++/59636
3585         * parser.c (cp_parser_template_parameter): Early out with
3586         error_mark_node if parameter declaration was not parsed.
3588         PR c++/59629
3589         * parser.c (cp_parser_lambda_expression): Save/reset/restore
3590         auto_is_implicit_function_template_parm_p around lambda body.
3592         PR c++/59638
3593         * parser.c (cp_parser_init_declarator): Undo fully implicit
3594         template parameter list when declarator is not a function.
3596 2014-01-03  Marc Glisse  <marc.glisse@inria.fr>
3598         PR c++/58950
3599         * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3601 2014-01-03  Tobias Burnus  <burnus@net-b.de>
3603         PR c++/58567
3604         * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3606 2014-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
3608         Core DR 1442
3609         PR c++/59165
3610         * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3611         as include_std to perform_koenig_lookup.
3612         (cp_parser_postfix_expression): Adjust.
3613         * pt.c (tsubst_copy_and_build): Likewise.
3614         * semantics.c (perform_koenig_lookup): Remove bool parameter.
3615         (omp_reduction_lookup): Adjust.
3616         * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3617         (lookup_arg_dependent): Likewise.
3618         (lookup_function_nonclass): Adjust.
3619         * name-lookup.h: Adjust declaration.
3620         * cp-tree.h: Likewise.
3622 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3624         PR c++/59087
3625         * parser.c (cp_parser_userdef_numeric_literal): Mention
3626         -fext-numeric-literals in the message.
3628 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3630         PR c++/59641
3631         * call.c (build_conditional_expr_1): Check the return value of
3632         force_rvalue.
3634 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3636         * call.c (convert_like_real): Check complain.
3638 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3640         PR c++/59378
3641         * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3642         in templates.
3644 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3646         Update copyright years
3648 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3650         * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3651         the standard form for the copyright notice.
3653 Copyright (C) 2014 Free Software Foundation, Inc.
3655 Copying and distribution of this file, with or without modification,
3656 are permitted in any medium without royalty provided the copyright
3657 notice and this notice are preserved.