* gcc.dg/store-motion-fgcse-sm.c (dg-final): Cleanup
[official-gcc.git] / gcc / cp / ChangeLog
blob6cc7e62097034398475208498a48ddd3249adef9
1 2014-11-21  Jason Merrill  <jason@redhat.com>
3         PR c++/63657
4         PR c++/38958
5         * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
6         if the temporary has a non-trivial destructor.
7         * decl.c (poplevel): Don't look through references.
9         PR c++/63942
10         * name-lookup.c (supplement_binding_1): Override a mangling alias.
11         * mangle.c (maybe_remove_implicit_alias): New.
12         (mangle_decl): Always avoid creating conflicting alias.
13         * cp-tree.h: Adjust.
15         PR c++/63849
16         * mangle.c (decl_mangling_context): Use template_type_parameter_p.
18         PR c++/63588
19         * pt.c (uses_template_parms): Handle null argument.
21 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
23         PR target/63764
24         * typeck.c (cp_build_array_ref): Adjust
25         convert_vector_to_pointer_for_subscript caller.  If it returns true,
26         call non_lvalue_loc on the result.
28 2014-11-20  Jason Merrill  <jason@redhat.com>
30         PR c++/63658
31         * pt.c (convert_nontype_argument): Call convert_from_reference.
32         (check_instantiated_arg): Don't be confused by reference refs.
33         (unify): Look through reference refs on the arg, too.
34         * mangle.c (write_template_arg): Look through reference refs.
36         * error.c (dump_expr): Avoid printing (*&i) for references.
38 2014-11-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
40         PR c++/63959
41         * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
43 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
45         * cp-objcp-common.c: Use hash_table instead of htab.
47 2014-11-19  Jason Merrill  <jason@redhat.com>
49         PR c++/56041
50         * cp-tree.h (struct processing_template_decl_sentinel): New.
51         * pt.c (instantiate_non_dependent_expr_internal): Split out from...
52         (instantiate_non_dependent_expr_sfinae): Here.
53         (convert_nontype_argument): Use them.
54         * constexpr.c (fold_non_dependent_expr): Use them.
56         PR c++/63885
57         * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
58         complain yet about a reference.
59         [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
60         [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
61         (cxx_bind_parameters_in_call): In the new scheme addr is always false.
62         * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
64         PR c++/57979
65         * init.c (decl_really_constant_value): Rename from
66         integral_constant_value.
67         (scalar_constant_value): Similar but limited to scalar results.
68         (decl_constant_value_safe): Remove.
69         (constant_value_1): Respect return_aggregate_cst_ok_p.
70         * typeck.c (decay_conversion): Use scalar_constant_value.
71         * call.c (convert_like_real): Likewise.
72         * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
73         * typeck.c (decay_conversion): Or ARRAY_TYPE.
74         * constexpr.c (struct constexpr_ctx): Add strict field.
75         (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
76         decl_constant_value and decl_really_constant_value.
77         (cxx_eval_outermost_constant_expr): Add strict parm.
78         (maybe_constant_init): Not strict.
79         (potential_constant_expression_1): Add strict parm.
80         Shorten most internal calls with RECUR macro.
81         * cp-tree.h, pt.c, semantics.c: Adjust.
83 2014-11-19  Jason Merrill  <jason@redhat.com>
85         PR c++/63928
86         * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
88 2014-11-19  Paolo Carlini  <paolo.carlini@oracle.com>
90         PR c++/55425
91         * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
92         and __PRETTY_FUNCTION__.
94 2014-11-18  Jason Merrill  <jason@redhat.com>
96         PR c++/63924
97         * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
98         from a variable of empty class type is constant.
100         * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
101         (potential_constant_expression_1): Handle STMT_EXPR.
103         * constexpr.c (cxx_eval_constant_expression): Give jump_target a
104         default argument.
105         (lots): Omit NULL jump_target arguments.
107         * constexpr.c (struct constexpr_ctx): Add quiet field.
108         (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
109         (lots): Replace allow_non_constant parameter with ctx->quiet.
111         PR c++/63940
112         * constexpr.c (cxx_eval_binary_expression): Don't assume the
113         expression was already folded.
114         (cxx_eval_unary_expression): Likewise.
116 2014-11-18  Marc Glisse  <marc.glisse@inria.fr>
118         PR libstdc++/43622
119         * rtti.c (emit_support_tinfos): Handle __float128.
121 2014-11-18  Jason Merrill  <jason@redhat.com>
123         PR c++/63925
124         * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
126         PR c++/63934
127         * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
128         rather than VOID_TYPE_P.
130         * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
132         PR c++/58102
133         * typeck2.c (store_init_value): Set it.
134         * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
135         * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
137 2014-11-17  Jason Merrill  <jason@redhat.com>
139         PR c++/33911
140         * call.c (build_call_a): Don't warn_deprecated_use here.
141         (build_over_call): Or here.
142         * decl2.c (mark_used): Do it here.
143         (is_late_template_attribute): Attribute deprecated is not deferred.
144         (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
145         * parser.c (cp_parser_template_name): Warn about deprecated template.
146         (cp_parser_template_argument): Likewise.
148         PR c++/50473
149         * decl.c (cp_finish_decl): Don't try to process a non-dependent
150         constant initializer for a reference.
151         * pt.c (value_dependent_expression_p): A reference is always
152         dependent.
153         * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
154         on any NOP_EXPRs.
156         Handle C++14 constexpr flow control.
157         * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
158         (cxx_eval_statement_list): New.
159         (cxx_eval_constant_expression): Handle LABEL_EXPR,
160         CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR.  Handle jump
161         semantics of RETURN_EXPR.
162         (many functions): Add jump_target parameter.
163         (returns, breaks, continues, switches, label_matches): New.
164         * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
165         * cp-gimplify.c (begin_bc_block): Set them.
167         * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
168         (genericize_for_stmt): Handle null statement-list.
170         * constexpr.c (use_new_call): Always use new call handling.
172         C++14 constexpr support (minus loops and multiple returns)
173         * constexpr.c (use_new_call): New macro.
174         (build_data_member_initialization): Ignore non-mem-inits.
175         (check_constexpr_bind_expr_vars): Remove C++14 checks.
176         (constexpr_fn_retval): Likewise.
177         (check_constexpr_ctor_body): Do nothing in C++14.
178         (massage_constexpr_body): In C++14 only collect mem-inits.
179         (get_function_named_in_call): Handle null CALL_EXPR_FN.
180         (cxx_bind_parameters_in_call): Build bindings in same order as
181         parameters.  Don't treat iniviref parms specially in new call mode.
182         (cxx_eval_call_expression): If use_new_call, do constexpr expansion
183         based on DECL_SAVED_TREE rather than the massaged constexpr body.
184         Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
185         (is_sub_constant_expr): Don't mess with ctx.ctor here.
186         (cxx_eval_component_reference): A null element means we're mid-
187         initialization.
188         (cxx_eval_store_expression, cxx_eval_increment_expression): New.
189         (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
190         MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
191         PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
192         POSTDECREMENT_EXPR.  Don't look into DECL_INITIAL of variables in
193         constexpr functions.  In new-call mode find parms in the values table.
194         (potential_constant_expression_1): Handle null CALL_EXPR_FN.
195         Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
196         PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
197         POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
198         CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
199         EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
200         CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
201         SWITCH_STMT, ASM_EXPR.
202         (cxx_eval_vec_init_1): Call build_aggr_init_expr.
203         (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
204         caller wants an lvalue.
205         (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
206         (maybe_constant_init): Look through INIT_EXPR.
207         (ensure_literal_type_for_constexpr_object): Set
208         cp_function_chain->invalid_constexpr.
209         * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
210         * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
211         (check_for_uninitialized_const_var): Likewise.
212         (maybe_save_function_definition): Check it.
213         * parser.c (cp_parser_jump_statement): Set
214         cp_function_chain->invalid_constexpr.
215         (cp_parser_asm_definition): Likewise.
217         PR c++/52282
218         * decl.c (build_ptrmemfunc_type): Don't build a different
219         RECORD_TYPE for a qualified PMF.
220         * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
221         (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
222         * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
223         * tree.c (cp_walk_subtrees): Likewise.
224         (cp_build_qualified_type_real): Remove special PMF handling.
226 2014-11-15  Jason Merrill  <jason@redhat.com>
228         * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
229         an expression.
231         * constexpr.c (cxx_eval_builtin_function_call): Use
232         fold_builtin_call_array.
234         * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
236 2014-11-14  Paolo Carlini  <paolo.carlini@oracle.com>
238         * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
239         * parser.c (cp_parser_omp_clause_collapse): Likewise.
240         (cp_parser_enumerator_definition): Don't call
241         instantiate_non_dependent_expr...
242         * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
243         * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
244         * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
245         the final gcc_assert.
247         * constexpr.c (fold_non_dependent_expr): Add.
248         * cp-tree.h (fold_non_dependent_expr): Declare it.
249         * call.c (null_ptr_cst_p): Use it.
250         * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
251         * semantics.c (begin_maybe_infinite_loop): Likewise.
252         * typeck.c (cp_build_binary_op): Likewise.
253         * typeck2.c (check_narrowing): Likewise.
255         * pt.c (fold_non_dependent_expr): Rename to
256         instantiate_non_dependent_expr.
257         (fold_non_dependent_expr_sfinae): Rename to
258         instantiate_non_dependent_expr_sfinae.
259         (convert_nontype_argument, build_non_dependent_expr): Adjust.
260         * decl.c (compute_array_index_type): Likewise.
261         * parser.c (cp_parser_parenthesized_expression_list,
262         cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
263         Likewise.
264         * semantics.c (end_maybe_infinite_loop, finish_static_assert):
265         Likewise.
266         * typeck.c (cxx_alignas_expr): Likewise.
267         * typeck2.c (store_init_value, massage_init_elt): Likewise.
268         * call.c: Adjust comments.
269         * class.c: Likewise.
270         * constexpr.c: Likewise.
271         * decl2.c: Likewise.
272         * tree.c: Likewise.
274 2014-11-14  Jonathan Wakely  <jwakely@redhat.com>
276         * mangle.c (find_substitution): Look for abi_tag on class templates.
278 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
279             Thomas Schwinge  <thomas@codesourcery.com>
280             Ilya Verbin  <ilya.verbin@intel.com>
281             Andrey Turetskiy  <andrey.turetskiy@intel.com>
283         * Make-lang.in (c++.install-common): Do not install for the offload
284         compiler.
286 2014-11-13  Kai Tietz  <ktietz@redhat.com>
288         * cp-tree.h (cp_build_function_call): Remove prototype.
289         (cp_build_addr_expr_strict): Likewise.
290         (build_typed_address): Likewise.
291         * typeck.c (build_typed_address): Removed.
292         (cp_build_addr_expr_strict): Make static.
293         (cp_build_function_call): Likewise.
295 2014-11-12  Paolo Carlini  <paolo.carlini@oracle.com>
297         DR 1510
298         PR c++/60420
299         * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
300         * decl.c (grokdeclarator): Use it.
301         * parser.c (cp_parser_simple_type_specifier): Likewise.
302         * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
304 2014-11-11  Paolo Carlini  <paolo.carlini@oracle.com>
306         PR c++/63265
307         * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
308         constant the condition.
310 2014-11-10  Andi Kleen  <ak@linux.intel.com>
312         * semantics.c (finish_goto_stmt): Call check_no_cilk.
313         (finish_while_stmt_cond): Dito.
314         (finish_do_stmt): Dito.
315         (finish_for_cond): Dito.
316         (finish_switch_cond): Dito.
318 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
320         * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
321         OPT_Wshift_count_overflow in the warnings.
323 2014-11-09  Jason Merrill  <jason@redhat.com>
325         DR 799
326         * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
327         same scalar type is an rvalue.
329         DR 2007
330         * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
332 2014-11-07  Jason Merrill  <jason@redhat.com>
334         DR 1558
335         * pt.c (dependent_alias_template_spec_p): New.
336         (dependent_type_p_r): Handle dependent alias template specialization.
337         (template_args_equal): A dependent alias template specializations
338         is not equal to its underlying type as a template argument.
339         * tree.c (strip_typedefs): Don't strip a dependent alias
340         template-id.
342         * parser.c (cp_parser_unqualified_id): Handle __func__ here.
343         (cp_parser_primary_expression): Not here.
345 2014-11-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>
347         PR c++/63366
348         * decl.c (grokdeclarator): Fix __complex meaning __complex double.
350 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
352         * constexpr.c: Remove redundant enum from machine_mode.
354 2014-10-28  Jason Merrill  <jason@redhat.com>
356         * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
358 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
360         * call.c: Adjust include files.
361         * class.c: Ditto.
362         * decl2.c: Ditto.
363         * decl.c: Ditto.
364         * lambda.c: Ditto.
365         * mangle.c: Ditto.
366         * method.c: Ditto.
367         * optimize.c: Ditto.
368         * parser.c: Ditto.
369         * semantics.c: Ditto.
370         * tree.c: Ditto.
371         * vtable-class-hierarchy.c: Ditto.
373 2014-10-24  Jason Merrill  <jason@redhat.com>
375         Implement N3653 (Member initializers and aggregates) and fix
376         references to 'this' in constexpr constructors.
377         * class.c (check_field_decls): In C++14 an NSDMI does not make the
378         class non-aggregate.
379         * constexpr.c (struct constexpr_ctx): New.
380         (cxx_bind_parameters_in_call): Handle 'this'.
381         (cxx_eval_call_expression): Create new constexpr_ctx.
382         (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
383         (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
384         (cxx_eval_bare_aggregate): Use them.  Build CONSTRUCTOR early.
385         (cxx_eval_vec_init_1): Likewise.
386         (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
387         [TARGET_EXPR]: Build new constexpr_ctx.
388         [PLACEHOLDER_EXPR]: New.
389         (cxx_eval_outermost_constant_expr): Build new constexpr_ctx.  Add
390         object parameter.
391         (is_sub_constant_expr): Build new constexpr_ctx.
392         (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
393         Allow 'this'.
394         * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
395         * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
396         * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
397         * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
398         * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
399         (build_ctor_subob_ref, replace_placeholders): New.
400         * typeck2.c (store_init_value): Use replace_placeholders.
401         (process_init_constructor_record): Make zero-init before NSDMI
402         explicit.
404 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
406         * cp-gimplify.c: Adjust include files.
408 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
410         PR c++/53061
411         * cp-objcp-common.c: Do not include new.
412         (cxx_initialize_diagnostics): Move from here to ...
413         * error.c (cxx_initialize_diagnostics): : ... here. Move
414         diagnostics initialization here from init_error.
415         (cxx_pp): Use a real pointer not a macro.
416         (init_error): Just initialize cxx_pp.
417         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
418         not set maximum line length.
420 2014-10-23  Jonathan Wakely  <jwakely@redhat.com>
422         PR c++/63619
423         * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
425 2014-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
427         * parser.c (cp_parser_unary_expression): Add default arguments.
428         (cp_parser_cast_expression, cp_parser_sizeof_operand,
429         cp_parser_omp_atomic): Adjust.
431 2014-10-20  Jason Merrill  <jason@redhat.com>
433         PR c++/63601
434         * lambda.c (current_nonlambda_function): New.
435         * semantics.c (finish_this_expr): Use it.
436         * cp-tree.h: Declare it.
438 2014-10-17  Alan Modra  <amodra@gmail.com>
440         PR middle-end/61848
441         * decl.c (merge_decls): Don't merge section name, comdat group or
442         tls model to newdecl symtab node, instead merge to olddecl.
443         Override existing olddecl section name.  Set tls_model for all
444         thread-local vars, not just OMP thread-private ones.  Remove
445         incorrect comment.
447 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
449         * cp-tree.h: Adjust include files.
451 2014-10-15  Jason Merrill  <jason@redhat.com>
453         PR c++/63528
454         * pt.c (lookup_template_variable): Call coerce_template_parms.
456 2014-10-15  Paolo Carlini  <paolo.carlini@oracle.com>
458         * semantics.c (is_instantiation_of_constexpr, literal_type_p,
459         ensure_literal_type_for_constexpr_object,
460         constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
461         retrieve_constexpr_fundef, is_valid_constexpr_fn,
462         build_anon_member_initialization, build_data_member_initialization,
463         check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
464         check_constexpr_ctor_body, sort_constexpr_mem_initializers,
465         build_constexpr_constructor_member_initializers, constexpr_fn_retval,
466         massage_constexpr_body, cx_check_missing_mem_inits,
467         register_constexpr_fundef, explain_invalid_constexpr_fn,
468         constexpr_call_hasher::hash, constexpr_call_hasher::equal,
469         maybe_initialize_constexpr_call_table, get_function_named_in_call,
470         get_nth_callarg, lookup_parameter_binding,
471         cxx_eval_builtin_function_call, adjust_temp_type,
472         cxx_bind_parameters_in_call, push_cx_call_context,
473         pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
474         reduced_constant_expression_p, verify_constant,
475         cxx_eval_unary_expression, cxx_eval_binary_expression,
476         cxx_eval_conditional_expression, cxx_eval_array_reference,
477         cxx_eval_component_reference, cxx_eval_bit_field_ref,
478         cxx_eval_logical_expression, base_field_constructor_elt,
479         cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
480         cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
481         cxx_eval_trinary_expression, var_in_constexpr_fn,
482         cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
483         is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
484         maybe_constant_init, potential_constant_expression_1,
485         potential_constant_expression, potential_rvalue_constant_expression,
486         require_potential_constant_expression,
487         require_potential_rvalue_constant_expression): Moved definitions...
488         * constexpr.c: ... here, new file.
489         * Make-lang.in: Update.
490         * config-lang.in: Likewise.
492 2014-10-14  Jason Merrill  <jason@redhat.com>
494         PR c++/63455
495         * parser.c (struct saved_token_sentinel): New.
496         (cp_parser_statement): Use it.
497         (cp_parser_start_tentative_firewall): New.
498         (cp_parser_end_tentative_firewall): New.
499         (cp_parser_lambda_expression): Use them.
500         (cp_parser_statement_expr): New.
501         (cp_parser_primary_expression): Use it.
503 2014-10-14  DJ Delorie  <dj@redhat.com>
505         * typeck.c (cp_common_type): Check for all __intN types, not just
506         __int128.
507         * decl.c (grokdeclarator): Likewise.
508         * rtti.c (emit_support_tinfos): Check for all __intN types, not just
509         __int128.
510         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
511         for all __intN types, not just __int128.
512         (cp_parser_simple_type_specifier): Likewise.
513         * mangle.c (integer_type_codes): Remove int128-specific codes.
514         * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
515         __intN was specified.
516         * lex.c (init_reswords): Reserve all __intN keywords.
518 2014-10-14  Marc Glisse  <marc.glisse@inria.fr>
520         * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
522 2014-10-13  H.J. Lu  <hongjiu.lu@intel.com>
524         * mangle.c (mangle_conv_op_name_for_type): Cast elements to
525         unsigned long.
526         (print_template_statistics): Cast size and elements to long.
528 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
530         * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
531         pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
532         hashtab.
534 2014-10-10  Jason Merrill  <jason@redhat.com>
536         PR c++/62115
537         * class.c (build_base_path): Preserve rvalueness.
538         * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
539         * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
541         PR c++/63194
542         * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
544         * method.c (implicitly_declare_fn): Handle deleted lambda default
545         ctor and copy assop here.
546         * class.c (check_bases_and_members): Not here.
547         (add_implicitly_declared_members): And don't set
548         CLASSTYPE_LAZY_MOVE_ASSIGN.
550         * semantics.c (finish_id_expression): Check for error_mark_node.
552 2014-10-09  Jason Merrill  <jason@redhat.com>
554         PR c++/63207
555         * semantics.c (outer_var_p): Non-static.
556         (process_outer_var_ref): Split out from finish_id_expression.
557         * pt.c (tsubst_copy_and_build): Call them.
558         * cp-tree.h: Declare them.
560 2014-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
562         * semantics.c (check_constexpr_ctor_body_1): New.
563         (check_constexpr_ctor_body): Use it; add bool parameter.
564         (build_data_member_initialization): Handle BIND_EXPR and
565         USING_STMT in the main conditional.
566         (build_constexpr_constructor_member_initializers): Do not
567         handle BIND_EXPR here.
568         (constexpr_fn_retval): Handle BIND_EXPR in the switch.
569         (massage_constexpr_body): Don't do it here.
570         * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
571         Adjust check_constexpr_ctor_body call.
572         (cp_parser_compound_statement): Do not pedwarn for compound-statement
573         in constexpr function in C++14 mode.
574         * cp-tree.h (check_constexpr_ctor_body): Update declaration.
576 2014-10-09  Jason Merrill  <jason@redhat.com>
578         PR c++/63309
579         * parser.c (cp_parser_class_head): push_template_decl for members
580         of templates, too.
582         PR c++/63415
583         * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
584         (iterative_hash_template_arg): Likewise.
586         PR c++/63437
587         * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
588         * semantics.c (force_paren_expr): And set it.
589         * typeck.c (check_return_expr): And handle it.
591 2014-10-09  Marc Glisse  <marc.glisse@inria.fr>
593         * decl.c (grokdeclarator): constexpr only implies const in C++11.
595 2014-10-08  Jason Merrill  <jason@redhat.com>
597         PR c++/63405
598         * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
600         PR c++/63485
601         * tree.c (build_cplus_array_type): Look for a type with no
602         typedef-name or attributes.
604         * call.c (call_copy_ctor): New.
605         (build_over_call): Use it to avoid infinite recursion on invalid code.
607 2014-10-07  Jason Merrill  <jason@redhat.com>
609         * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
611 2014-10-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
613         * cp/parser.c: Allow [[deprecated]] for C++11.  Issue a pedwarn.
615 2014-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
617         PR c++/55250
618         * semantics.c (check_constexpr_bind_expr_vars): New.
619         (check_constexpr_ctor_body, massage_constexpr_body): Use it.
620         (build_constexpr_constructor_member_initializers): Handle
621         BIND_EXPR in the main conditional.
623 2014-10-02  Mark Wielaard  <mjw@redhat.com>
625         PR debug/63239
626         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
627         (cp_function_decl_deleted_p): New prototype.
628         * cp-objcp-common.c (cp_function_deleted_p): New function.
630 2014-10-03  Marc Glisse  <marc.glisse@inria.fr>
632         PR c++/54427
633         PR c++/57198
634         PR c++/58845
635         * typeck.c (cp_build_binary_op): save_expr after convert to save
636         redundant operations.
637         [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
638         (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
640 2014-10-03  Jason Merrill  <jason@redhat.com>
642         * decl.c (start_decl): Complain about static/thread_local vars
643         in constexpr function.
644         (check_for_uninitialized_const_var): Also uninitialized vars.
645         * parser.c (cp_parser_jump_statement): And gotos.
646         (cp_parser_asm_operand_list): And asm.
647         (cp_parser_try_block): And try.
648         * semantics.c (ensure_literal_type_for_constexpr_object): And
649         non-literal.
651         * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
652         (var_in_constexpr_fn): New.
653         (cxx_eval_constant_expression): Look into DECL_INITIAL.
654         (potential_constant_expression_1): Allow constexpr-local vars.
656         PR c++/63362
657         * tree.c (strip_typedefs): Handle TREE_LIST.
659 2014-10-03  Paolo Carlini  <paolo.carlini@oracle.com>
661         * parser.c (cp_parser_assignment_expression,
662         cp_parser_constant_expression): Add default arguments.
663         (cp_parser_primary_expression,
664         cp_parser_postfix_open_square_expression,
665         cp_parser_parenthesized_expression_list,
666         cp_parser_question_colon_clause,
667         cp_parser_expression, cp_parser_constant_expression,
668         cp_parser_label_for_labeled_statement, cp_parser_static_assert,
669         cp_parser_template_argument, cp_parser_enumerator_definition,
670         cp_parser_member_declaration, cp_parser_constant_initializer,
671         cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
672         cp_parser_std_attribute_spec, cp_parser_objc_message_args,
673         cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
674         cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
675         cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
676         cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
677         cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
679 2014-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
681         PR c++/53025
682         * cp-tree.h (struct saved_scope): Add noexcept_operand.
683         (cp_noexcept_operand): Define.
684         * call.c (build_over_call): Use it.
685         * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
686         * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
688 2014-10-01  Jason Merrill  <jason@redhat.com>
690         PR c++/63362
691         * method.c (constructible_expr): Handle value-init of non-class.
692         * parser.c (cp_parser_trait_expr): Allow pack expansion.
693         * pt.c (tsubst_copy_and_build): Handle pack expansion.
695         PR c++/63362
696         * class.c (type_has_non_user_provided_default_constructor): Rename
697         from type_has_user_provided_default_constructor, reverse sense.
698         (default_init_uninitialized_part, explain_non_literal_class): Adjust.
699         (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
700         * call.c (build_new_method_call_1): Adjust.
701         * cp-tree.h: Adjust.
702         * decl.c (grok_special_member_properties): Don't set
703         TYPE_HAS_COMPLEX_DFLT.
704         * init.c (build_value_init_noctor): Don't use
705         type_has_user_provided_default_constructor.
707 2014-09-30  Jason Merrill  <jason@redhat.com>
709         * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
710         CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
711         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
712         * parser.c (cp_parser_primary_expression): Likewise.
713         (cp_parser_trait_expr): Likewise.  Handle variadic trait.
714         * semantics.c (trait_expr_value): Likewise.
715         (finish_trait_expr): Likewise.
716         (check_trait_type): Handle variadic trait.  Return bool.
717         * method.c (build_stub_object): Add rvalue reference here.
718         (locate_fn_flags): Not here.
719         (check_nontriv, assignable_expr, constructible_expr): New.
720         (is_trivially_xible): New.
722         * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
723         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
724         * parser.c (cp_parser_primary_expression): Likewise.
725         (cp_parser_trait_expr): Likewise.
726         * semantics.c (trait_expr_value): Likewise.
727         (finish_trait_expr): Likewise.
729         * method.c (build_stub_object): Use CONVERT_EXPR.
730         * tree.c (build_dummy_object): Likewise.
731         (is_dummy_object): Adjust.
733         * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
734         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
735         * semantics.c (trait_expr_value): Likewise.
736         (finish_trait_expr): Likewise.
737         * parser.c (cp_parser_primary_expression): Likewise.
738         (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
740 2014-09-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
742        PR c++/16564
743        * error.c (print_instantiation_context): Delete.
744        * typeck2.c (build_x_arrow): Record location when pushing
745        template instantiation.
746        * pt.c (push_tinst_level): Make it a wrapper around ...
747        (push_tinst_level_loc): ... this. New function. Make excessive
748        template instantiation depth a fatal error. Record location. Use
749        bool as return type.
750        (instantiate_pending_templates): Make excessive
751        template instantiation depth a fatal error.
752        (problematic_instantiation_changed): Use bool as return type.
753        * cp-tree.h (print_instantiation_context): Delete.
754        (push_tinst_level): Update declaration.
755        (problematic_instantiation_changed): Likewise.
756        (push_tinst_level_loc): New.
758 2014-09-29  Richard Biener  <rguenther@suse.de>
760         * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
761         for conversions.
763 2014-09-26  Jason Merrill  <jason@redhat.com>
765         * mangle.c (find_substitution): Use write_abi_tags.
767 2014-09-25  Marek Polacek  <polacek@redhat.com>
769         PR c++/61945
770         * class.c (warn_hidden): Check for FUNCTION_DECL.
772 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
774         PR c++/63249
775         * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
776         on low_bound and length.
778 2014-09-24  Aldy Hernandez  <aldyh@redhat.com>
780         * class.c, decl.c, optimize.c: Rename all instances of
781         DECL_ABSTRACT to DECL_ABSTRACT_P.
783 2014-09-24  Marek Polacek  <polacek@redhat.com>
785         PR c/61405
786         PR c/53874
787         * semantics.c (finish_switch_cond): Call unlowered_expr_type.
788         * tree.c (bot_manip): Add default case.
789         * parser.c (cp_parser_primary_expression): Cast the controlling
790         expression of a switch to an int.
791         (cp_parser_unqualified_id): Likewise.
793 2014-09-23  Paolo Carlini  <paolo.carlini@oracle.com>
795         PR c++/61857
796         * parser.c (cp_parser_skip_to_closing_square_bracket,
797         cp_parser_array_designator_p): New.
798         (cp_parser_initializer_list): Use the latter.
800 2014-09-22  Jason Merrill  <jason@redhat.com>
802         * semantics.c (finish_non_static_data_member): In diagnostic, give
803         error at point of use and note at point of declaration.
805         PR c++/63320
806         PR c++/60463
807         PR c++/60755
808         * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
809         not finding 'this'.
811 2014-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
813         PR c++/62219
814         * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
816 2014-09-22  Jason Merrill  <jason@redhat.com>
818         * decl.c (poplevel): Don't warn about unused vars in template scope.
819         * error.c (dump_decl): Handle variable templates.
821 2014-09-20  Jason Merrill  <jason@redhat.com>
823         PR c++/62017
824         * decl.c (begin_destructor_body): Only clobber the as-base part of
825         *this.
827 2014-09-19  Jason Merrill  <jason@redhat.com>
829         PR c++/61392
830         * mangle.c (write_expression): Use unresolved-name mangling for
831         DR850 case.
833         PR c++/61465
834         * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
835         after pulling out an element from a CONSTRUCTOR.
837 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
839         PR c++/63248
840         * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
841         on type of type dependent expressions, and don't call it if
842         handle_omp_array_sections has kept TREE_LIST because something
843         was type dependent.
844         * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
845         Use keep_next_level, begin_omp_structured_block and
846         finish_omp_structured_block instead of push_stmt_list and
847         pop_stmt_list.
849 2014-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
851         PR c++/62232
852         * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
853         for final class types.
855 2014-09-15  Jason Merrill  <jason@redhat.com>
857         * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
858         necessary.  Call inherit_targ_abi_tags here.
859         * class.c (check_bases_and_members): Not here.
860         (inherit_targ_abi_tags): Check CLASS_TYPE_P.
861         * cp-tree.h: Declare inherit_targ_abi_tags.
863 2014-09-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
865         Do not diagnose lambda default arguments in c++14 modes.
866         * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
867         conditional.
869 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
871         * Make-lang.in (check_g++_parallelize): Change to just an upper bound
872         number.
874 2014-09-13  Marek Polacek  <polacek@redhat.com>
876         PR c++/60862
877         * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
878         location of a call expression.
880 2014-09-11  Jason Merrill  <jason@redhat.com>
882         PR c++/63201
883         * decl.c (start_decl): Handle specialization of member variable
884         template.
885         * pt.c (check_explicit_specialization): Adjust error.
887 2014-09-11  Paolo Carlini  <paolo.carlini@oracle.com>
889         PR c++/61489
890         * typeck2.c (process_init_constructor_record): Do not warn about
891         missing field initializer if EMPTY_CONSTRUCTOR_P (init).
893 2014-09-11  Jason Merrill  <jason@redhat.com>
895         PR c++/63139
896         * pt.c (tsubst_pack_expansion): Simplify substitution into T....
897         (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
899 2014-09-10  Jason Merrill  <jason@redhat.com>
901         PR c++/61659
902         * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
903         (duplicate_decls, start_decl): Likewise.
904         * pt.c (check_explicit_specialization): Likewise.
905         (push_template_decl_real): Or static templates.
907 2014-09-08  Jason Merrill  <jason@redhat.com>
909         * typeck.c (build_class_member_access_expr): Move
910         -Winvalid-offsetof code...
911         * semantics.c (finish_offsetof): ...here.
912         * parser.c (cp_parser_builtin_offsetof): Remember the location of
913         the type argument.
914         * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
916         PR c++/62255
917         * pt.c (instantiate_decl): Handle recursive instantiation of
918         static data member.
920 2014-09-05  Jason Merrill  <jason@redhat.com>
922         PR c++/62659
923         * semantics.c (potential_constant_expression_1): Handle un-folded
924         pointer to member constants.
926 2014-09-04  Markus Trippelsdorf  <markus@trippelsdorf.de>
928         PR ipa/61659
929         * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
930         newdecl, not olddecl.
932 2014-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
934         DR 1453
935         * class.c (check_field_decls): A class of literal type cannot have
936         volatile non-static data members and base classes.
937         (explain_non_literal_class): Update.
939 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
940             Balaji V. Iyer  <balaji.v.iyer@intel.com>
941             Igor Zamyatin  <igor.zamyatin@intel.com>
943         * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
944         simplified.
945         * parser.c (cp_parser_cilk_for): New function.
946         (cp_parser_cilk_grainsize): Likewise.
947         (cp_parser_statement): Added RID_CILK_FOR case.
948         (cp_parser_omp_for_cond): Added CILK_FOR check.
949         (cp_parser_omp_for_loop_init): Change function argument to accept
950         tree_code instead just a bool flag; change the check to use that
951         tree_code; check for initialization declaration in case of Cilk_for.
952         (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
953         changed call to cp_parser_omp_for_loop_init according new arguments'
954         list.
955         (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
956         * pt.c (tsubst_expr): Added CILK_FOR case.
957         * semantics.c: Include convert.h.
958         (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
959         case; added OMP_CLAUSE__CILK_FOR_COUNT_.
960         (handle_omp_for_class_iterator): New argument lastp and its usage;
961         added NE_EXPR case.
962         (finish_omp_for): Changed call to handle_omp_for_class_iterator
963         according new arguments' list; in case of Cilk_for save very first
964         decl and create empty stmt_list block; use block to build correct
965         statement tree.
967 2014-08-31  Jason Merrill  <jason@redhat.com>
969         PR c++/62302
970         * optimize.c (cdtor_comdat_group): Just look at the
971         DECL_ASSEMBLER_NAME of the 'tors.
973 2014-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
975         PR c++/52892
976         * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
977         result of cxx_eval_constant_expression.
979 2014-08-26  Jason Merrill  <jason@redhat.com>
981         PR c++/58624
982         * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
983         (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
984         * semantics.c (finish_id_expression): Don't call TLS wrapper in a
985         template.
987 2014-08-25  Jason Merrill  <jason@redhat.com>
989         * pt.c (check_explicit_specialization): Don't complain about
990         non-template variable.
991         (template_for_substitution): Allow variable templates.
992         (check_template_variable): Fix logic for member var template.
993         * decl.c (start_decl): Don't complain about extra template header
994         here.
996         * decl.c (start_decl): Look through member variable template.
997         * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
998         * decl2.c (grokfield): Set DECL_CONTEXT earlier on
999         variables.
1001 2014-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
1003         PR c++/34938
1004         * cp-tree.h (TFF_POINTER): Add.
1005         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
1006         argument too.
1007         * error.c (dump_type_suffix): Actually print the const and noreturn
1008         attribute when appropriate.
1010 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
1012         * decl.c (compute_array_index_type, grokdeclarator,
1013         undeduced_auto_decl): Change from cxx1y to cxx14.
1014         *lambda.c(add_capture()): Change error message from C++1y to C++14.
1015         * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
1016         cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
1017         cp_parser_decltype, cp_parser_conversion_type_id,
1018         cp_parser_simple_type_specifier, cp_parser_type_id_1,
1019         cp_parser_template_type_arg, cp_parser_std_attribute,
1020         cp_parser_template_declaration_after_export): Ditto.
1021         * pt.c (tsubst): Ditto.
1022         * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1023         * tree.c: Change comment.
1024         * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1025         cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1027 2014-08-23  Jason Merrill  <jason@redhat.com>
1029         Allow non-constexpr variable templates.
1030         * decl2.c (note_variable_template_instantiation): New.
1031         * cp-tree.h: Declare it.
1032         * pt.c (instantiate_decl): Call it.
1033         (push_template_decl_real): Allow non-constexpr variable templates.
1034         * semantics.c (finish_id_expression): Mark the variable template
1035         instantiation as used.
1036         * mangle.c (write_mangled_name): Variable template instantiations
1037         are mangled.
1038         * parser.c (cp_parser_init_declarator): Complain about
1039         non-function implicit templates.
1041 2014-08-22  Marek Polacek  <polacek@redhat.com>
1043         PR c++/62199
1044         * parser.c (cp_parser_binary_expression): Check each LHS if it's
1045         preceded with logical not.  Adjust call to
1046         warn_logical_not_parentheses.
1048 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1050         PR c++/57709
1051         * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1052         declaration shadows a function declaration, unless the former
1053         declares a function, pointer to function or pointer to member
1054         function, because this is a common and valid case in real-world
1055         code.
1056         * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1057         Improve description.
1059 2014-08-22  Jason Merrill  <jason@redhat.com>
1061         PR c++/62129
1062         * class.c (outermost_open_class): Fix logic.
1063         * decl.c (complete_vars): Fix logic.
1065 2014-08-22  Jason Merrill  <jason@redhat.com>
1067         PR c++/62129
1068         * class.c (outermost_open_class): New.
1069         * cp-tree.h: Declare it.
1070         * decl.c (maybe_register_incomplete_var): Use it.
1071         (complete_vars): Handle any constant variable.
1072         * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1074 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
1076         PR other/62008
1077         * cp-array-notation.c (build_array_notation_ref): Added correct
1078         handling of case with incorrect array.
1080 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1082         PR fortran/44054
1083         * error.c (cp_diagnostic_finalizer): Delete.
1084         (init_error): Do not set diagnostic_finalizer here.
1086 2014-08-19  Marek Polacek  <polacek@redhat.com>
1088         PR c++/62153
1089         * call.c (build_new_op_1): Remember the type of arguments for
1090         a comparison.  If either operand of a comparison is a boolean
1091         expression, call maybe_warn_bool_compare.
1093 2014-08-19  Jason Merrill  <jason@redhat.com>
1095         PR tree-optimization/62091
1096         * decl2.c (decl_needed_p): Return true for virtual functions when
1097         devirtualizing.
1099         PR lto/53808
1100         PR c++/61659
1101         * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1102         comdat_linkage.
1104 2014-08-19  Gerald Pfeifer  <gerald@pfeifer.com>
1106         * class.c (contains_empty_class_p): Remove.
1108 2014-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
1110         * parser.c (cp_parser_expression): Add default arguments.
1111         (cp_parser_primary_expression, cp_parser_postfix_expression,
1112         cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1113         cp_parser_unary_expression, cp_parser_direct_new_declarator,
1114         cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1115         cp_parser_lambda_body, cp_parser_expression_statement,
1116         cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1117         cp_parser_iteration_statement, cp_parser_jump_statement,
1118         cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1119         cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1120         cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1121         cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1122         cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1123         cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1124         cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1125         cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1126         cp_parser_transaction_expression): Adjust.
1128 2014-08-15  Jason Merrill  <jason@redhat.com>
1130         PR c++/61566
1131         * pt.c (lookup_template_class_1): Revert recent change.
1132         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1134         PR c++/61566
1135         * pt.c (instantiate_class_template_1): Ignore lambda on
1136         CLASSTYPE_DECL_LIST.
1137         (push_template_decl_real): A lambda is not primary.
1138         (lookup_template_class_1): Don't look for a lambda partial
1139         instantiation.
1140         * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1141         currently in a function and the lambda living in a function.
1142         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1144 2014-08-15  Richard Biener  <rguenther@suse.de>
1145             Jason Merrill  <jason@redhat.com>
1147         PR bootstrap/62077
1148         * tree.c (build_min_array_type, set_array_type_canon): Split out...
1149         (build_cplus_array_type): ...from here.  Only call build_array_type
1150         for main variants.
1152 2014-08-15  Paolo Carlini  <paolo.carlini@oracle.com>
1154         PR c++/62072
1155         Revert:
1156         2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1158         DR 1584
1159         PR c++/57466
1160         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1161         cv-qualifiers of function types.
1163 2014-08-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1165         * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1167 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1169         * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1170         cp_build_array_ref, cp_build_function_call_vec): When a
1171         pedwarn is suppressed under SFINAE, return error_mark_node.
1173         * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1174         tf_warning_or_error, where complain is a bool, glitch.
1176 2014-08-14  Ville Voutilainen  <ville.voutilainen@gmail.com>
1178         PR c++/62101
1179         * decl.c (grokdeclarator): Move the check for friend initializers..
1180         * decl2.c (grokfield) ..here. Postpone early return for friends
1181         until after the initializer check.
1183 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1185         PR c++/54377
1186         * pt.c (coerce_template_parms): Improve error message vs default
1187         arguments.
1189 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1191         * parser.c (cp_parser_init_declarator): Remove redundant check of
1192         decl_specifiers->type.
1194 2014-08-13  Jason Merrill  <jason@redhat.com>
1196         * call.c (build_x_va_arg): Support passing non-POD through ....
1197         (convert_arg_to_ellipsis): Likewise.
1199 2014-08-13  Andrew Sutton  <andrew.n.sutton@gmail.com>
1201         * pt.c (lookup_template_variable): Make dependent variable templates
1202         have unknown type.
1204 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
1206         * parser.c (cp_parser_elaborated_type_specifier): Handle
1207         specially cp_parser_template_id returning a BASELINK.
1209 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
1211         * parser.c (cp_parser_diagnose_invalid_type_name,
1212         cp_parser_make_typename_type): Remove scope parameter.
1213         (cp_parser_parse_and_diagnose_invalid_type_name,
1214         cp_parser_elaborated_type_specifier): Adjust calls.
1216 2014-08-12  Ville Voutilainen  <ville.voutilainen@gmail.com>
1218         Reject virt-specifiers on friends and member templates
1219         * friend.c (do_friend): Diagnose virt-specifiers.
1220         * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1222 2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
1224         * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1225         return type to bool; in C++11 for constants give errors, not pedwarns.
1226         * cp-tree.h (check_narrowing): Adjust declaration.
1227         * call.c (convert_like_real): Update calls.
1228         * semantics.c (finish_compound_literal): Likewise.
1230 2014-08-08  Jason Merrill  <jason@redhat.com>
1232         * pt.c (lookup_template_class_1): Copy abi_tag.
1234 2014-08-08  Kai Tietz  <ktietz@redhat.com>
1236         * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1237         that we operate on a true inline.
1239 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
1241         * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1242         optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1244 2014-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
1246         PR c++/51312
1247         * decl.c (build_enumerator): Handle class types with conversion
1248         operators via perform_implicit_conversion_flags and
1249         build_expr_type_conversion.
1251         * cvt.c (build_expr_type_conversion): Replace pair of errors
1252         with error + inform.
1254 2014-08-07  Jason Merrill  <jason@redhat.com>
1256         PR c++/62043
1257         * parser.c (c_parse_file): Change sorry to fatal_error.
1259         PR c++/61959
1260         * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1262 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
1264         * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1266 2014-08-06  Jason Merrill  <jason@redhat.com>
1268         * init.c (build_vec_init): Fix constant initialization of
1269         trailing elements.
1270         (build_value_init_noctor): Call maybe_constant_init.
1271         * semantics.c (maybe_constant_init): See through EXPR_STMT and
1272         conversion to void.
1274         PR c++/60417
1275         * init.c (build_vec_init): Reorganize earlier change a bit.
1277         PR c++/61994
1278         * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1279         if we're just returning an INIT_EXPR.
1281 2014-08-06  Jason Merrill  <jason@redhat.com>
1282             Braden Obrzut  <admin@maniacsvault.net>
1284         * pt.c (check_explicit_specialization): Don't test
1285         DECL_DECLARED_INLINE_P for a variable template.
1287 2014-08-06  Paolo Carlini  <paolo.carlini@oracle.com>
1289         PR c++/43906
1290         * typeck.c (cp_build_binary_op): Extend to more cases the
1291         -Waddress warning.
1293 2014-08-01  Braden Obrzut  <admin@maniacsvault.net>
1295         Implement constexpr variable templates
1296         * decl.c (grokvardecl): Handle specializations of variable templates.
1297         (grokdeclarator): Handle variable template id expressions and NULL_TREE
1298         return from grokvardecl.
1299         * decl2.c (check_member_template): Allow declaration of template member
1300         variables.
1301         * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1302         variable templates.
1303         * pt.c (check_template_variable): Accept variable temploids at
1304         non-class scope.
1305         (push_template_decl_real): The current instantiation of a template
1306         can be a VAR_DECL.
1307         (determine_specialization): Accept variable templates.
1308         (check_explicit_specialization): Handle and check for malformed
1309         variable template specializations.
1310         (lookup_template_variable): New.
1311         (tsubst_decl): Handle variable template specializations.
1312         (do_decl_instantiation): Handle template variables.
1313         (instantiate_decl): Handle template variables.
1314         * semantics.c (finish_template_variable): New.
1315         (finish_id_expression): Instantiate variable templates.
1316         * cp-tree.h (variable_template_p): New.
1318 2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
1320         PR c++/15339
1321         * decl.c (check_redeclaration_no_default_args): New.
1322         (duplicate_decls): Use it, handle default arguments
1323         in redeclarations of function templates.
1325 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1327         * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1329 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1331         * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1332         method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1333         instead of pointer_set.
1335 2014-08-01  Jason Merrill  <jason@redhat.com>
1337         PR c++/60417
1338         * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1339         init-list for trailing elements.
1340         * typeck2.c (process_init_constructor_array): Likewise.
1342 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
1344         DR 217 again
1345         * decl.c (duplicate_decls): Handle static member functions too.
1347 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1349         * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1350         in error output.
1352 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1354         PR other/61963
1355         * parser.c (cp_parser_array_notation): Added check for array_type.
1357 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1359         PR middle-end/61455
1360         * cp-array-notation.c (expand_array_notation_exprs): Handling of
1361         DECL_EXPR improved. Changed handling for INIT_EXPR.
1363 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
1365         * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1367 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
1369         * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1370         -fsanitize=alignment call ubsan_maybe_instrument_reference
1371         for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1372         for calls to member functions.
1374 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
1376         PR c++/60517
1377         * typeck.c (maybe_warn_about_returning_address_of_local): Return
1378         whether it is returning the address of a local variable.
1379         (check_return_expr): Return 0 instead of the address of a local
1380         variable.
1382 2014-07-30  Jason Merrill  <jason@redhat.com>
1384         PR lto/53808
1385         PR c++/61659
1386         * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1388 2014-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1390         PR c++/57397
1391         * pt.c (unify_arity): Add boolean parameter.
1392         (unify_too_few_arguments): Likewise.
1393         (type_unification_real): Diagnose correctly insufficient
1394         arguments in the presence of trailing variadic parameters;
1395         deducing multiple trailing packs as empty is fine.
1397 2014-07-30  Jason Merrill  <jason@redhat.com>
1399         PR c++/61659
1400         PR c++/61687
1401         Revert:
1402         * decl2.c (mark_all_virtuals): New variable.
1403         (maybe_emit_vtables): Check it instead of flag_devirtualize.
1404         (cp_write_global_declarations): Set it and give helpful diagnostic
1405         if it introduces errors.
1406         * class.c (finish_struct_1): Check it.
1408         PR lto/53808
1409         PR c++/61659
1410         * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1411         (check_explicit_specialization): Clear it on specializations.
1412         * decl.c (duplicate_decls, start_decl): Likewise.
1413         (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1414         * method.c (implicitly_declare_fn): Set DECL_COMDAT.  Determine
1415         linkage after setting the appropriate flags.
1416         * tree.c (decl_linkage): Don't check DECL_COMDAT.
1417         * decl2.c (mark_needed): Mark clones.
1418         (import_export_decl): Not here.
1420 2014-07-25  Edward Smith-Rowland  <3dw4rd@verizon.net>
1422         Implement N4051 - Allow typename in a template template parameter
1423         * parser.c (cp_parser_type_parameter_key): New funtion;
1424         (cp_parser_token_is_type_parameter_key): Ditto;
1425         (cp_parser_type_parameter): Look for type-parameter-key for all versions
1426         but pedwarn for less than cxx1z.
1428 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
1430         PR c++/50961
1431         * call.c (standard_conversion): Use resolve_nondeduced_context
1432         for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1434 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
1436         PR c++/61804
1437         * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1438         for '++' and '--'.
1440 2014-07-15  Jason Merrill  <jason@redhat.com>
1442         PR c++/61811
1443         * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1445         PR c++/60848
1446         PR c++/61723
1447         * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1448         * class.c (finish_struct): Reject invalid definition of
1449         std::initializer_list.
1451 2014-07-15  Paolo Carlini  <paolo.carlini@oracle.com>
1453         * call.c (convert_like_real): Call print_z_candidate and inform only
1454         if permerror returns true.
1456 2014-07-14  Jan Hubicka  <hubicka@ucw.cz>
1458         * class.c (build_clone): Do not clear assembler names of
1459         templates.
1460         * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1461         * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1462         as a special case return sizeof (struct tree_decl_non_common)
1463         for other decls.
1464         (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1465         initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1466         * cp/cp-tree.h (tree_template_decl): New structure.
1467         (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1468         (union cp_lang_tree_node): Add template_decl.
1469         (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1471 2014-07-14  Jason Merrill  <jason@redhat.com>
1473         PR c++/61445
1474         PR c++/56947
1475         * pt.c (instantiate_decl): Don't check defer_ok for local class
1476         members.
1478 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
1480         PR middle-end/61294
1481         * cp-tree.h (LITERAL_ZERO_P): Define.
1482         * parser.c (cp_parser_parenthesized_expression_list): Add
1483         want_literal_zero_p argument, if true, for literal zeros
1484         insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1485         (cp_parser_postfix_expression): Adjust
1486         cp_parser_parenthesized_expression_list caller, handle
1487         -Wmemset-transposed-args.
1488         (literal_zeros): New variable.
1490 2014-07-13  Jason Merrill  <jason@redhat.com>
1492         PR c++/58511
1493         * semantics.c (is_instantiation_of_constexpr): Return true for
1494         defaulted functions, too.
1495         (explain_invalid_constexpr_fn): Only use
1496         explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1497         * method.c (explain_implicit_non_constexpr): Pass
1498         DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1500         PR c++/58611
1501         * decl.c (check_initializer): Don't finish_compound_literal
1502         on erroneous constexpr init.
1504         PR c++/58612
1505         * tree.c (bot_replace): Only replace a dummy 'this' parm.
1507         PR c++/60628
1508         * decl.c (create_array_type_for_decl): Only check for auto once.
1510         PR c++/58636
1511         * call.c (build_list_conv): Don't try to build a list of references.
1513 2014-07-13  Edward Smith-Rowland  <3dw4rd@verizon.net>
1515         PR C++/60209 - Declaration of user-defined literal operator cause error
1516         * parser.c (cp_parser_operator): Fold treatment of strings
1517         and user-defined string literals.  Use the full string parser.
1518         (cp_parser_string_literal): Add flag to not look for literal operator.
1520 2014-07-11  Jason Merrill  <jason@redhat.com>
1522         PR c++/22434
1523         PR c++/61288
1524         * call.c (build_conditional_expr_1): Avoid reading freed memory.
1526 2014-07-11  Paolo Carlini  <paolo.carlini@oracle.com>
1528         PR c++/53159
1529         * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1530         into convflags.
1531         * decl.c (check_initializer): Don't call check_narrowing here,
1532         set LOOKUP_NO_NARROWING.
1533         * typeck2.c (digest_init_r): Likewise.
1535 2014-07-10  Jason Merrill  <jason@redhat.com>
1537         PR c++/61661
1538         * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1540         PR c++/61659
1541         PR c++/61687
1542         * decl2.c (mark_all_virtuals): New variable.
1543         (maybe_emit_vtables): Check it instead of flag_devirtualize.
1544         (cp_write_global_declarations): Set it and give helpful diagnostic
1545         if it introduces errors.
1546         * class.c (finish_struct_1): Check it.
1547         * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1549 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1551         PR c++/60686
1552         * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1553         outside class declaration, in friend declaration, and neither on
1554         constructor nor conversion operator.
1556 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1558         DR 1584
1559         PR c++/57466
1560         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1561         cv-qualifiers of function types.
1563 2014-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
1564             Paolo Carlini  <paolo.carlini@oracle.com>
1566         PR c++/59361
1567         * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1568         CPP_ELLIPSIS too.
1570 2014-07-07  Paolo Carlini  <paolo.carlini@oracle.com>
1572         * class.c (check_for_override): Wrap the 'final' and 'override'
1573         keywords in %< and %>.
1575 2014-07-06  Marek Polacek  <polacek@redhat.com>
1577         PR c/6940
1578         * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1579         * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1580         * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1581         function parameter.
1583 2014-07-02  Paolo Carlini  <paolo.carlini@oracle.com>
1585         * pt.c (convert_template_argument): Use inform instead of error in
1586         three places.
1588 2014-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
1590         PR c++/58781
1591         PR c++/60249
1592         PR c++/59867
1593         * parser.c (cp_parser_userdef_string_literal): Take a tree
1594         not a cp_token*.
1595         (cp_parser_string_literal): Don't hack the token stream.
1597 2014-06-30  Jason Merrill  <jason@redhat.com>
1599         PR c++/61659
1600         PR lto/53808
1601         * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1602         devirtualizing.
1603         * init.c (build_vtbl_address): Don't mark destructor.
1604         * class.c (finish_struct_1): Add all classes to keyed_classes
1605         if devirtualizing.
1607         PR c++/61647
1608         * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1610         PR c++/61566
1611         * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1613         * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1614         TYPE_BINFO or TYPE_LANG_SPECIFIC.
1615         * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1616         (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1617         * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1618         * pt.c (unify): Also check whether the argument is a PMF.
1620 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
1622         PR c++/54891
1623         * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1624         a '[' can also start a primary-expression.
1625         (cp_parser_cast_expression): Parse a cast-expression only tentatively
1626         when cp_parser_tokens_start_cast_expression returns -1.
1628 2014-06-30  Jason Merrill  <jason@redhat.com>
1630         PR c++/61539
1631         * pt.c (unify_one_argument): Type/expression mismatch just causes
1632         deduction failure.
1634         * semantics.c (simplify_aggr_init_expr): Remove remnants of
1635         2014-04-11 change.
1637 2014-06-30  Marek Polacek  <polacek@redhat.com>
1639         * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1640         function has no_sanitize_undefined attribute.
1641         * decl.c (compute_array_index_type): Don't instrument VLAs if the
1642         function has no_sanitize_undefined attribute.
1644 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
1646         PR middle-end/57541
1647         * cp-array-notation.c (expand_sec_reduce_builtin):
1648         Check that bultin argument is correct.
1649         * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1651 2014-06-28  Jonathan Wakely  <jwakely@redhat.com>
1653         DR 1579
1654         PR c++/58051
1655         * typeck.c (check_return_expr): Lookup as an rvalue even when the
1656         types aren't the same.
1658 2014-06-27  Jason Merrill  <jason@redhat.com>
1660         PR c++/61433
1661         * error.c (dump_template_bindings): Don't tsubst in a clone.
1663 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1665         PR c++/61614
1666         * semantics.c (finish_compound_literal): Revert r204228.
1668 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1670         * parser.c (cp_parser_compound_literal_p): New.
1671         (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1673 2014-06-26  Jason Merrill  <jason@redhat.com>
1675         * parser.c (cp_parser_for_init_statement): Change range-for error
1676         to pedwarn.
1678         N3994 Ranged-based for-loops: The Next Generation
1679         * parser.c (cp_lexer_nth_token_is): New.
1680         (cp_parser_for_init_statement): Allow "for (id : init)".
1682 2014-06-26  Teresa Johnson  <tejohnson@google.com>
1684         * class.c (dump_class_hierarchy): Use saved dump files.
1685         (dump_vtable): Ditto.
1686         (dump_vtt): Ditto.
1688 2014-06-26  Adam Butcher  <adam@jessamine.co.uk>
1690         PR c++/61537
1691         * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1692         parameter lists outside of function parameter scope.
1694 2014-06-25  Paolo Carlini  <paolo.carlini@oracle.com>
1696         DR 178
1697         PR c++/49132
1698         * typeck2.c (process_init_constructor_record): Do not complain about
1699         uninitialized const members, because within aggregate-initialization,
1700         members without explicit initializers are value-initialized.
1702 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
1704         * semantics.c (finish_omp_clauses): Make sure
1705         OMP_CLAUSE_LINEAR_STEP has correct type.
1707 2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
1709         * class.c (check_methods, create_vtable_ptr, determine_key_method,
1710         add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1711         FUNCTION_DECL check.
1712         * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1713         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1714         (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1715         (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1717 2014-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
1719         PR c++/33972
1720         * decl.c (grokdeclarator): Do not early check for operator-function-id
1721         as non-function.
1723 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
1725         * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1726         Adjust.
1728 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
1730         * parser.c (cp_parser_omp_for_loop): For
1731         #pragma omp parallel for simd move lastprivate clause from parallel
1732         to for rather than simd.
1734 2014-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
1736         DR 577
1737         PR c++/33101
1738         * decl.c (grokparms): Accept a single parameter of type 'void'.
1740 2014-06-20  Jason Merrill  <jason@redhat.com>
1742         PR c++/59296
1743         * call.c (add_function_candidate): Avoid special 'this' handling
1744         if we have a ref-qualifier.
1746         PR c++/61556
1747         * call.c (build_over_call): Call build_this in template path.
1749 2014-06-19  Jason Merrill  <jason@redhat.com>
1751         PR c++/59296
1752         * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1754 2014-06-18  Jason Merrill  <jason@redhat.com>
1756         PR c++/59296
1757         * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1758         ref-qualifier handling.
1760         PR c++/61507
1761         * pt.c (resolve_overloaded_unification): Preserve
1762         ARGUMENT_PACK_EXPLICIT_ARGS.
1764 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
1766         * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1767         argument.
1768         * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1770 2014-06-17  Jason Merrill  <jason@redhat.com>
1772         PR c++/60605
1773         * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1775 2014-06-15  Jason Merrill  <jason@redhat.com>
1777         PR c++/61488
1778         * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1780         PR c++/61500
1781         * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1783 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1785         * decl.c (grokvardecl): Fix pasto in previous patch.
1787 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1789         * decl.c (duplicate_decls): Use set_decl_tls_model.
1790         (grokdeclarator): Likewise.
1791         * semantics.c (finish_id_expression): Check TLS only for
1792         static variables.
1793         (finish_omp_threadprivate): Use decl_default_tls_model.
1794         * decl2.c (get_guard): Likewise.
1795         * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1797 2014-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1799         PR c++/33101
1800         * decl.c (grokparms): Improve error message about void parameters.
1801         * error.c (type_to_string): Fix aka cut off code.
1803 2014-06-12  Jason Merrill  <jason@redhat.com>
1805         * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1806         * cvt.c (type_promotes_to): Likewise.
1807         * mangle.c (write_type, write_expression): Likewise.
1808         (write_name, write_template_arg): Likewise.
1809         (mangle_decl): Make alias based on flag_abi_compat_version.
1810         Emit -Wabi warning here.
1811         (finish_mangling_internal): Not here.  Drop warn parm.
1812         (finish_mangling_get_identifier, finish_mangling): Adjust.
1813         (mangle_type_string, mangle_special_for_type): Adjust.
1814         (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1815         (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1816         (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1818         * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1819         * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1820         (layout_nonempty_base_or_field, end_of_class): Likewise.
1821         (layout_empty_base, build_base_field, layout_class_type): Likewise.
1822         (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1823         (layout_virtual_bases): Likewise.
1824         * decl.c (compute_array_index_type): Likewise.
1825         * mangle.c (write_mangled_name, write_prefix): Likewise.
1826         (write_template_prefix, write_integer_cst, write_expression): Likewise.
1827         (write_template_arg, write_array_type): Likewise.
1828         * method.c (lazily_declare_fn): Likewise.
1829         * rtti.c (get_pseudo_ti_index): Likewise.
1830         * typeck.c (comp_array_types): Likewise.
1832 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
1834         * vtable-class-hierarchy.c: Update handling for section names
1835         that are no longer trees.
1836         * decl.c (duplicate_decls): Likewise.
1838 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1840         PR c++/19200
1841         * parser.c (cp_parser_init_declarator): Actually pass friend_p
1842         to cp_parser_declarator.
1844 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1846         PR c++/60265
1847         * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1848         * name-lookup.c (validate_nonmember_using_decl): Adjust error
1849         message.
1851 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1853         PR c++/19200
1854         * parser.c (cp_parser_declarator): Add bool parameter.
1855         (cp_parser_direct_declarator): Likewise, use it.
1856         (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1857         (cp_parser_condition, cp_parser_explicit_instantiation,
1858         cp_parser_init_declarator, cp_parser_type_id_1,
1859         cp_parser_parameter_declaration, cp_parser_exception_declaration,
1860         cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1861         cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1862         Adjust.
1863         * decl.c (grokdeclarator): Fix handling of friend declared in
1864         namespace scope (g++.dg/parse/friend10.C).
1866 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
1868         * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1869         ->implicit_section.
1870         * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1871         (maybe_clone_body): Move symbol across comdat groups.
1872         * method.c (use_thunk): Copy implicit section flag.
1874 2014-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1876         PR c++/22556
1877         * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1879 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
1881         * method.c (use_thunk): Use set_decl_section_name.
1882         * optimize.c (maybe_clone_body): Use set_decl_section_name.
1883         * decl.c (duplicate_decls): Likewise.
1884         * vtable-class-hierarchy.c: Likewise.
1886 2014-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
1888         PR c++/60184
1889         * class.c (check_field_decls): In C++11 mode do not reject
1890         static data members and reference-type members in unions.
1892 2014-06-05  Jason Merrill  <jason@redhat.com>
1894         PR c++/43453
1895         * decl.c (check_initializer): Collapse a TREE_LIST here.
1896         * typeck2.c (store_init_value): Not here.
1898 2014-06-05  Richard Biener  <rguenther@suse.de>
1899             Paolo Carlini  <paolo.carlini@oracle.com>
1901         PR c++/56961
1902         * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1903         handling of empty classes.
1905 2014-06-04  Jason Merrill  <jason@redhat.com>
1907         * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1908         for noexcept and thread_local, too.
1910         PR c++/61343
1911         * decl.c (check_initializer): Maybe clear
1912         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1914 2014-06-05  Richard Biener  <rguenther@suse.de>
1916         PR c++/61004
1917         * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1918         warnings for accessing empty classes.
1920 2014-06-05  Marek Polacek  <polacek@redhat.com>
1922         PR c/49706
1923         * parser.c (cp_parser_binary_expression): Warn when logical not is
1924         used on the left hand side operand of a comparison.
1926 2014-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
1928         PR c++/43453
1929         * typeck.c (cp_build_modify_expr): Handle array of characters
1930         initialized by a string literal.
1931         * decl.c (check_initializer): Handle parenthesized string literal
1932         as initializer.
1933         * typeck2.c (store_init_value): Remove redundant check.
1935 2014-06-04  Jason Merrill  <jason@redhat.com>
1937         PR c++/51253
1938         PR c++/61382
1939         * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1940         * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1942 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
1944         PR c/58942
1945         * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1946         with a pointer.
1948 2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1950         DR 1423
1951         PR c++/52174
1952         * call.c (standard_conversion): Convert nullptr to bool only
1953         in case of direct-initialization.
1954         (convert_like_real): Provide informative error message.
1956 2014-06-03  Marek Polacek  <polacek@redhat.com>
1958         PR c/60439
1959         * semantics.c (finish_switch_cond): Warn if switch condition has
1960         boolean value.
1962 2014-06-03  Jason Merrill  <jason@redhat.com>
1964         PR c++/60992
1965         * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first.  Add a new
1966         variable to local_specializations.
1968         PR c++/60848
1969         * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1971 2014-06-02  Jason Merrill  <jason@redhat.com>
1973         PR c++/61046
1974         * decl.c (reshape_init_class): Handle un-folded
1975         constant-expressions.
1977         PR c++/61134
1978         * pt.c (pack_deducible_p): Handle canonicalization.
1980 2014-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1982         * pt.c (tsubst_function_type): Initialize arg_types.
1984 2014-06-02  Siva Chandra Reddy  <sivachandra@google.com>
1986         PR debug/57519
1987         * class.c (handle_using_decl): Pass the correct scope to
1988         cp_emit_debug_info_for_using.
1990 2014-06-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1992         PR c++/59483
1993         PR c++/61148
1994         * search.c (accessible_p): Use current_nonlambda_class_type.
1995         * semantics.c (check_accessibility_of_qualified_id): Likewise.
1997 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1999         * decl.c: Include builtins.h.
2000         * semantics.c: Likewise.
2002 2014-05-31  Paolo Carlini  <paolo.carlini@oracle.com>
2004         DR 1227
2005         PR c++/57543
2006         * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
2007         * pt.c (tsubst_function_type): Inject the this parameter; do the
2008         substitutions in the order mandated by the DR.
2009         (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
2010         * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
2011         (static_fn_type): Copy it.
2012         * decl2.c (build_memfn_type, change_return_type,
2013         cp_reconstruct_complex_type): Likewise.
2014         * parser.c (cp_parser_lambda_declarator_opt): Likewise.
2015         * tree.c (strip_typedefs): Likewise.
2016         * typeck.c (merge_types): Likewise.
2018 2014-05-30  Jason Merrill  <jason@redhat.com>
2020         PR c++/56947
2021         * pt.c (instantiate_decl): Check that defer_ok is not set for
2022         local class members.
2024         PR c++/60992
2025         * pt.c (tsubst_init): Split out from...
2026         (tsubst_expr) [DECL_EXPR]: Here.
2027         (tsubst_copy) [VAR_DECL]: Use it.
2028         * semantics.c (finish_id_expression): Return the decl for static/const.
2030 2014-05-28  Jason Merrill  <jason@redhat.com>
2032         PR c++/47202
2033         * decl.c (cxx_comdat_group): Return a decl.
2034         * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2036         * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2037         bound.
2039         PR c++/61242
2040         * call.c (build_aggr_conv): Ignore passed in flags.
2041         (build_array_conv, build_complex_conv): Likewise.
2043 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
2045         * optimize.c (maybe_thunk_body): Use set_comdat_group.
2046         (maybe_clone_body): Likewise.
2047         * decl.c (duplicate_decls): Update code duplicating comdat group;
2048         do not copy symtab pointer; before freeing newdecl remove it
2049         from symtab.
2050         * decl2.c (constrain_visibility): Use set_comdat_group.
2052 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
2054         * rtti.c: Include tm_p.h
2055         (emit_tinfo_decl): Force RTTI data to be aligned to required
2056         ABI alignment only.
2058 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
2060         * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2061         ignoring other target adjustments.
2063 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
2065         * semantics.c (finish_omp_clauses): Remove duplicated variable
2066         initialization.
2068         * parser.c (cp_parser_omp_target): Return bool values.
2070 2014-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
2072         PR c++/61088
2073         * lambda.c (add_capture): Enforce that capture by value requires
2074         complete type.
2075         * typeck2.c (cxx_incomplete_type_inform): Early return if
2076         TYPE_MAIN_DECL is null.
2078 2014-05-21  Jonathan Wakely  <jwakely@redhat.com>
2080         PR c/61271
2081         * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2083 2014-05-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
2085         PR c++/61133
2086         * lambda.c (build_capture_proxy, add_capture): Treat normal
2087         captures and init-captures identically.
2089 2014-05-21  Mark Wielaard  <mjw@redhat.com>
2091         PR debug/16063
2092         * cp-lang.c (cxx_enum_underlying_base_type): New function.
2093         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2095 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
2097         * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2098         * cp-array-notation.c (replace_invariant_exprs): Likewise.
2099         (expand_array_notation): Handle VOID_CST.
2100         * error.c (dump_expr): Likewise.
2101         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2102         (cxx_pretty_printer::expression): Likewise.
2103         (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2104         * decl.c (register_dtor_fn): Likewise.
2105         * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2106         (build_delete, push_base_cleanups): Likewise.
2107         * mangle.c (write_expression): Likewise.
2108         * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2109         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2110         (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2111         * tree.c (cp_tree_equal): Likewise.
2112         (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2113         instead of void_zero_node.
2114         * typeck.c (check_return_expr): Likewise.
2115         * typeck2.c (build_functional_cast): Likewise.
2117 2014-05-21  Igor Zamyatin  <igor.zamyatin@intel.com>
2119         PR c/60189
2120         * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2121         from here to...
2122         (cp_parser_statement): ...here. Make sure only semicolon can go after
2123         Cilk_sync.
2125 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2127         PR c++/58753
2128         PR c++/58930
2129         PR c++/58704
2130         * typeck2.c (digest_nsdmi_init): New.
2131         * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2132         * init.c (get_nsdmi): Likewise.
2133         * cp-tree.h (digest_nsdmi_init): Declare.
2135 2014-05-20  Jason Merrill  <jason@redhat.com>
2137         * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2138         up a virtual function in a dummy object.
2140 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2142         PR c++/60373
2143         * decl.c (duplicate_decls): Replace pair of warning_at with
2144         warning_at + inform.
2145         (maybe_commonize_var): Likewise.
2147 2014-05-20  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
2149         PR bootstrap/61210
2150         * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2151         (tsubst_copy_and_build): Perform recursive substitutions in a
2152         deterministic order.
2154 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2156         PR c++/58664
2157         * typeck2.c (cxx_incomplete_type_inform): New.
2158         (cxx_incomplete_type_diagnostic): Use it.
2159         * decl.c (grokdeclarator): Check the element type of an
2160         incomplete array type; call the above.
2161         * cp-tree.h (cxx_incomplete_type_inform): Declare.
2163 2014-05-19  Jason Merrill  <jason@redhat.com>
2165         PR c++/58761
2166         * pt.c (tsubst_copy): Don't check at_function_scope_p.
2167         (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2169 2014-05-19  Paolo Carlini  <paolo.carlini@oracle.com>
2171         * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2172         * parser.c (cp_parser_enum_specifier): Likewise.
2174 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
2176         * class.c (sorted_fields_type_new): Adjust.
2177         * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2178         * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2179         * cp-tree.h: Remove usage of variable_size gty attribute.
2180         * decl.c (make_label_decl): Adjust.
2181         (check_goto): Likewise.
2182         (start_preparsed_function): Likewise.
2183         (save_function_data): Likewise.
2184         * lex.c (init_reswords): Likewise.
2185         (retrofit_lang_decl): Likewise.
2186         (cxx_dup_lang_specific_decl): Likewise.
2187         (copy_lang_type): Likewise.
2188         (cxx_make_type): Likewise.
2189         * name-lookup.c (binding_entry_make): Likewise.
2190         (binding_table_construct): Likewise.
2191         (binding_table_new): Likewise.
2192         (cxx_binding_make): Likewise.
2193         (pushdecl_maybe_friend_1): Likewise.
2194         (begin_scope): Likewise.
2195         (push_to_top_level): Likewise.
2196         * parser.c (cp_lexer_alloc): Likewise.
2197         (cp_lexer_new_from_tokens): Likewise.
2198         (cp_token_cache_new): Likewise.
2199         (cp_parser_context_new): Likewise.
2200         (cp_parser_new): Likewise.
2201         (cp_parser_nested_name_specifier_opt): Likewise.
2202         (cp_parser_template_id): Likewise.
2203         * pt.c (maybe_process_partial_specialization): Likewise.
2204         (register_specialization): Likewise.
2205         (add_pending_template): Likewise.
2206         (lookup_template_class_1): Likewise.
2207         (push_tinst_level): Likewise.
2208         * semantics.c (register_constexpr_fundef): Likewise.
2209         (cxx_eval_call_expression): Likewise.
2210         * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2212 2014-05-16  Paolo Carlini  <paolo.carlini@oracle.com>
2214         PR c++/51640
2215         * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2216         when cp_parser_lookup_name sets ambiguous_decls.
2218 2014-05-15  Jason Merrill  <jason@redhat.com>
2220         * call.c (print_conversion_rejection): Use loc consistently.
2222 2014-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
2224         * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2225         * call.c (convert_like_real, build_new_method_call_1): Use it.
2226         * decl2.c (grokfield): Likewise.
2227         * init.c (perform_member_init, build_aggr_init, expand_default_init,
2228         build_new_1): Likewise.
2229         * mangle.c (write_expression): Likewise.
2230         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2232 2014-05-14  Jason Merrill  <jason@redhat.com>
2234         PR c++/20332
2235         PR c++/21631
2236         * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2237         dropped cv-quals as a bad conversion.
2238         (convert_like_real) [ck_ref_bind]: Explain them.
2239         (compare_ics): Check badness before stripping reference
2240         bindings.  Handle comparing bad reference bindings.
2241         * typeck.c (comp_cv_qualification): Add overload that just takes
2242         integers.
2243         * cp-tree.h: Declare it.
2245         * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2246         (arg_conversion_rejection, bad_arg_conversion_rejection)
2247         (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2248         (add_function_candidate): Pass actual argument, rather than type, to
2249         bad_arg_conversion_rejection.
2250         (print_conversion_rejection): Explain what's wrong with the conversion.
2251         (print_z_candidates): Say "candidate:" before each candidate.
2252         (splice_viable): Be strict if we see a viable or template candidate.
2253         (build_user_type_conversion_1): Pass false to strict parameter.
2254         (perform_overload_resolution, build_conditional_expr_1): Likewise.
2255         (build_new_op_1, build_new_method_call_1): Likewise.
2256         (build_op_call_1): Pass true to strict parameter.
2258 2014-05-13  Jason Merrill  <jason@redhat.com>
2260         * call.c (print_error_for_call_failure): Say "no match" rather
2261         than "ambiguous" if there were no strict matches.
2262         (build_new_method_call_1): Likewise.
2264         PR c++/61151
2265         * semantics.c (is_this_parameter): Allow capture proxies too.
2267 2014-05-12  Jason Merrill  <jason@redhat.com>
2269         * call.c (maybe_print_user_conv_context): New.
2270         (convert_like_real): Use it.  Print call context for bad
2271         user-defined conversion.
2272         (build_over_call): Print call context for bad 'this' conversion.
2274         * call.c (convert_like_real): Use inform for identifying the
2275         declaration point.
2277 2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
2279         * cvt.c (cp_convert_to_pointer): Don't call error_at if
2280         complain & tf_error is false.
2282         * decl.c (make_unbound_class_template): Prefer inform for
2283         "declared here"-type message.
2285 2014-05-09  Momchil Velikov  <momchil.velikov@gmail.com>
2287         PR c++/60463
2288         PR c++/60755
2289         * lambda.c (lambda_expr_this_capture): Add new parameter
2290         add_capture_p controlling whether the functions will try to
2291         capture 'this' via the default capture.
2292         (maybe_resolve_dummy): Likewise.
2293         * cp-tree.h: Adjust prototypes.
2294         * call.c, semantics.c: Change callers of these functions.
2295         * call.c (build_new_method_call_1): Use the actual 'this' that
2296         would be potentially captured for the overload resolution, instead
2297         of the dummy object.
2299 2014-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
2301         * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2302         parameter.
2303         (convert_nontype_argument): Adjust calls.
2304         (coerce_template_parameter_pack): Add missing complain & tf_error
2305         check.
2307 2014-05-09  Jason Merrill  <jason@redhat.com>
2309         DR 587
2310         PR c++/51317
2311         * call.c (build_conditional_expr_1, conditional_conversion): Handle
2312         non-class lvalues and xvalues that differ only in cv-qualifiers.
2314         DR 5
2315         PR c++/60019
2316         * call.c (build_user_type_conversion_1): The copy-init temporary
2317         is cv-unqualified.
2319         PR c++/58714
2320         * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2322         PR c++/54348
2323         * call.c (build_conditional_expr_1): If overload resolution finds
2324         no match, just say "different types".
2326         PR c++/32019
2327         * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2329         PR c++/22434
2330         * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2331         if we didn't find a conversion.
2332         Don't accept a bad conversion too early.
2334 2014-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
2336         PR c++/13981
2337         * typeck.c (convert_for_assignment): Provide an inform for pointers
2338         to incomplete class types.
2340 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
2342         PR c++/61083
2343         * pt.c (convert_nontype_argument): Protect all the error calls
2344         with complain & tf_error.
2346 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
2348         PR c++/61080
2349         * pt.c (instantiate_decl): Avoid generating the body of a
2350         deleted function.
2352 2014-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
2354         PR c++/60999
2355         * pt.c (maybe_begin_member_template_processing): Use
2356         uses_template_parms.
2358 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2359             Mike Stump  <mikestump@comcast.net>
2360             Richard Sandiford  <rdsandiford@googlemail.com>
2362         * call.c: Include wide-int.h.
2363         (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2364         (convert_for_arg_passing): Likewise.
2365         * class.c: Include wide-int.h.
2366         (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2367         (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2368         (include_empty_classes): Likewise
2369         (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2370         * cvt.c: Include wide-int.h.
2371         (ignore_overflows): Use wide_int_to_tree.
2372         * decl.c: Include wide-int.h.
2373         (check_array_designated_initializer): Use wide-int interfaces.
2374         (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2375         (finish_enum_value_list): Use signop.
2376         (build_enumerator): Use wide-int interfaces.
2377         * init.c: Include wide-int.h.
2378         (build_new_1): Use wide-int interfaces.
2379         * mangle.c: Include wide-int.h.
2380         (write_integer_cst): Use wide-int interfaces.
2381         (write_array_type): Likewise.
2382         * tree.c: Include wide-int.h.
2383         (cp_tree_equal): Use tree_int_cst_equal.
2384         * typeck2.c: Include wide-int.h.
2385         (process_init_constructor_array): Use wide-int interfaces.
2387 2014-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
2389         PR c++/58582
2390         * decl.c (grokfndecl): Check duplicate_decls return value for
2391         error_mark_node.
2392         * pt.c (instantiate_decl): A deleted function is defined.
2394 2014-05-02  Jason Merrill  <jason@redhat.com>
2396         * decl2.c (vague_linkage_p): Local statics have vague linkage.
2398         PR c++/60992
2399         * lambda.c (lambda_capture_field_type): Wrap anything dependent
2400         other than 'this'.
2401         (add_capture): Check for VLA before calling it.
2402         * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2403         just the current one.  Make non-static.
2404         * cp-tree.h: Declare it.
2405         * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2406         the operand was static or constant.
2408 2014-05-02  Marek Polacek  <polacek@redhat.com>
2410         * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2411         warning_at calls.
2413 2014-05-01  Marek Polacek  <polacek@redhat.com>
2415         PR c/43395
2416         * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2417         between label and variable when warning about returning local address.
2419 2014-04-30  Jason Merrill  <jason@redhat.com>
2421         PR c++/60980
2422         * init.c (build_value_init): Don't try to call an array constructor.
2424         PR c++/60951
2425         * typeck2.c (massage_init_elt): Use maybe_constant_init.
2427 2014-04-30  Marek Polacek  <polacek@redhat.com>
2429         * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2430         even when SANITIZE_FLOAT_DIVIDE is on.  Set doing_div_or_mod even
2431         for non-integer types.
2433 2014-04-29  Jason Merrill  <jason@redhat.com>
2435         DR 1351
2436         Represent the unevaluated exception specification of an implicitly
2437         declared or deleted function with a simple placeholder, not a list
2438         of functions.
2439         * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2440         * except.c (unevaluated_noexcept_spec): New.
2441         * class.c (deduce_noexcept_on_destructor): Use it.
2442         * decl.c (check_redeclaration_exception_specification): Call
2443         maybe_instantiate_noexcept.
2444         (duplicate_decls): Call it before merge_types.
2445         (start_preparsed_function): Call maybe_instantiate_noexcept.
2446         * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2447         * init.c (get_nsdmi): Factor out of perform_member_init.
2448         * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2449         (walk_field_subobs): Consider NSDMI for EH spec.
2450         (get_defaulted_eh_spec): New.
2451         (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2452         (defaulted_late_check): Defer EH checking in non-template classes.
2453         (after_nsdmi_defaulted_late_checks): New.
2454         * parser.c (cp_parser_class_specifier_1): Use it.
2455         (unparsed_classes): New macro.
2456         * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2457         * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2458         Remove list-of-functions handling.
2459         * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2460         handling and FN parameter.
2461         * typeck.c (merge_types): Adjust.
2463 2014-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
2465         PR c++/59120
2466         * parser.c (cp_parser_alias_declaration): Check return value of
2467         cp_parser_require.
2469 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
2471         * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2472         atomic-clause, allow comma in between atomic-clause and
2473         seq_cst.
2475 2014-04-24  Marc Glisse  <marc.glisse@inria.fr>
2477         PR libstdc++/43622
2478         * rtti.c (emit_support_tinfos): Do not iterate on
2479         registered_builtin_types (partial revert).
2481 2014-04-23 Dinar Temirbulatov  <dtemirbulatov@gmail.com>
2483         PR c++/57958
2484         * semantics.c (apply_deduced_return_type): Complete non-void type
2485         before estimating whether the type is aggregate.
2487 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
2489         PR libstdc++/43622
2490         * rtti.c (emit_support_tinfo_1): New function, extracted from
2491         emit_support_tinfos.
2492         (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2494 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
2496         PR c/59073
2497         * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2498         fails, don't set OM_PARALLEL_COMBINED and return NULL.
2500 2014-04-18  Jason Merrill  <jason@redhat.com>
2502         DR 1571
2503         * call.c (reference_binding): Recurse on user-defined conversion.
2505         PR c++/60872
2506         * call.c (standard_conversion): Don't try to apply restrict to void.
2508 2014-04-16  Marc Glisse  <marc.glisse@inria.fr>
2510         * decl.c (reshape_init_r): Handle a single element of vector type.
2512 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
2514         PR c++/60765
2515         * decl2.c (cplus_decl_attributes): Handle
2516         pointer-to-member-function declarations.
2518 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
2520         PR c++/60764
2521         * call.c (build_user_type_coversion): Use build_dummy_object
2522         to create the placeholder object for a constructor method call.
2523         (build_special_member_call): Likewise.
2524         (build_over_call): Check for the placeholder object with
2525         is_dummy_object.
2526         (build_new_method_call_1): Likewise.  Don't attempt to resolve
2527         a dummy object for a constructor method call.
2529 2014-04-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
2531         PR c++/59295
2532         * friend.c (add_friend, make_friend_class): Move repeated friend
2533         warning under Wredundant_decls.
2535 2014-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
2537         * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2538         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2539         (do_class_using_decl): Likewise.
2540         * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2542 2014-04-15  Jakub Jelinek  <jakub@redhat.com>
2544         PR plugins/59335
2545         * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2547 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2549         * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2551 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2553         * pt.c (mark_template_parm): Use template_parm_level_and_index.
2555 2014-04-11  Jason Merrill  <jason@redhat.com>
2557         * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2558         * parser.c: Adjust.
2559         (cp_lexer_get_preprocessor_token): Always clear it.
2560         (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2562         DR 1467
2563         PR c++/51747
2564         * decl.c (reshape_init_r): Handle a single element of class type.
2566         DR 1338
2567         * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2568         built-in operator new.
2570 2014-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2572         PR c++/58600
2573         * name-lookup.c (parse_using_directive): Return early if the
2574         attribs argument is error_mark_node; use get_attribute_name.
2576 2014-04-11  Jason Merrill  <jason@redhat.com>
2578         DR 1030
2579         PR c++/51253
2580         * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2581         * call.c (struct z_candidate): Add flags field.
2582         (add_candidate): Add flags parm.
2583         (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2584         (add_template_candidate_real): Pass it.
2585         (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2586         * tree.c (build_aggr_init_expr): Copy it.
2587         * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2589 2014-04-10  Richard Biener  <rguenther@suse.de>
2590             Jakub Jelinek  <jakub@redhat.com>
2592         PR ipa/60761
2593         * error.c (dump_decl) <case FUNCTION_DECL>: If
2594         DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2595         recurse on DECL_ABSTRACT_ORIGIN instead of printing
2596         <built-in>.
2598 2014-04-09  Fabien Chêne  <fabien@gcc.gnu.org>
2600         * pt.c (check_template_variable): Check for the return of pedwarn
2601         before emitting a note.
2602         * parser.c (cp_parser_lambda_introducer): Likewise.
2604 2014-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
2606         PR c++/59115
2607         * pt.c (process_template_parm): For an invalid non-type parameter
2608         only set TREE_TYPE to error_mark_node.
2609         (push_inline_template_parms_recursive, comp_template_parms,
2610         redeclare_class_template, coerce_template_template_parm,
2611         coerce_template_template_parms, unify): Use error_operand_p.
2613 2014-04-08  Nathan Sidwell  <nathan@codesourcery.com>
2615         * class.c (check_bases_and_members): Warn about non-virtual dtors
2616         in public bases only.  Check warn_ecpp before complaining about
2617         non-polymorphic bases.
2619 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2621         * decl.c (duplicate_decls): Check for the return of warning_at
2622         before emitting a note.
2623         (warn_misplaced_attr_for_class_type): Likewise.
2624         (check_tag_decl): Likewise.
2626 2014-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
2628         PR c++/58207
2629         * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2631 2014-04-04  Patrick Palka  <patrick@parcs.ath.cx>
2633         PR c++/44613
2634         * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2635         * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2636         instantiating a variable-sized type.
2638         PR c++/21113
2639         * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2641 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2643         * class.c (find_abi_tags_r): Check for the return of warning
2644         before emitting a note.
2645         (one_inherited_ctor): Likewise.
2647 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2649         * decl.c (duplicate_decls): Check for the return of permerror
2650         before emitting a note.
2652 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
2654         * class.c (accessible_nvdtor_p): New.
2655         (check_bases): Don't check base destructor here ...
2656         (check_bases_and_members): ... check them here.  Trigger on
2657         Wnon-virtual-dtor flag.
2658         (finish_struct_1): Use accessible_nvdtor_p.
2660 2014-04-01  Jason Merrill  <jason@redhat.com>
2662         * pt.c (process_partial_specialization): Say "not deducible"
2663         rather than "not used".  Use inform.
2665         PR c++/60374
2666         * pt.c (coerce_template_parms): Check that the pack expansion
2667         pattern works with the first matching parameter.
2669 2014-04-01  Fabien Chêne  <fabien@gcc.gnu.org>
2671         * init.c (perform_member_init): Homogenize uninitialized
2672         diagnostics.
2674 2014-04-01  Jason Merrill  <jason@redhat.com>
2676         PR c++/60708
2677         * call.c (build_array_conv): Call complete_type.
2679         PR c++/60713
2680         * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2681         (picflag_from_initializer): Return it.
2682         (process_init_constructor): Handle it.
2684         PR c++/60642
2685         * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2686         * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2687         * pt.c (get_template_info): Handle NAMESPACE_DECL.
2688         (most_general_template): Handle more kinds of template.
2689         * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2690         instantiations and specializations.
2692 2014-03-31  Patrick Palka  <patrick@parcs.ath.cx>
2694         PR c++/44859
2695         * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2696         COMPONENT_REFs and ARRAY_REFs sooner.
2698 2014-03-29  Adam Butcher  <adam@jessamine.co.uk>
2700         PR c++/60626
2701         * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2702         usage in non-functions with pushed scope.
2704 2014-03-28  Adam Butcher  <adam@jessamine.co.uk>
2706         PR c++/60573
2707         * name-lookup.h (cp_binding_level): New transient field defining_class_p
2708         to indicate whether a scope is in the process of defining a class.
2709         * semantics.c (begin_class_definition): Set defining_class_p.
2710         * name-lookup.c (leave_scope): Reset defining_class_p.
2711         * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2712         defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2713         unwinding to class-defining scope to handle the erroneous definition of
2714         a generic function of an arbitrarily nested class within an enclosing
2715         class.
2717 2014-03-26  Fabien Chêne  <fabien@gcc.gnu.org>
2719         PR c++/52369
2720         * method.c (walk_field_subobs): Improve the diagnostic
2721         locations for both REFERENCE_TYPEs and non-static const members.
2722         * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2723         instead of %qD to be consistent with the c++11 diagnostic.
2725 2014-03-25  Jason Merrill  <jason@redhat.com>
2727         PR c++/60566
2728         PR c++/58678
2729         * class.c (build_vtbl_initializer): Handle abstract dtors here.
2730         * search.c (get_pure_virtuals): Not here.
2732         PR c++/60375
2733         * parser.c (cp_parser_lambda_expression): Don't parse the body of
2734         a lambda in unevaluated context.
2736         PR c++/60628
2737         * decl.c (create_array_type_for_decl): Complain about array of auto.
2739 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
2741         PR c++/60331
2742         * semantics.c (potential_constant_expression_1): Handle
2743         DECL_EXPR.
2745 2014-03-24  Adam Butcher  <adam@jessamine.co.uk>
2747         PR c++/60627
2748         * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2749         introducing an implicit function template parameter within an explicit
2750         instantiation.
2752 2014-03-22  Jason Merrill  <jason@redhat.com>
2754         PR c++/60574
2755         * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2756         to error.
2758 2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
2760         PR c++/60384
2761         * name-lookup.c (push_class_level_binding_1): Check identifier_p
2762         on the name argument.
2764 2014-03-20  Jakub Jelinek  <jakub@redhat.com>
2766         PR c++/60572
2767         * init.c (build_zero_init_1): Ignore fields with error_mark_node
2768         type.
2770 2014-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
2772         PR c++/51474
2773         * call.c (build_new_method_call_1): Handle pure virtuals called by
2774         NSDMIs too.
2776 2014-03-17  Adam Butcher  <adam@jessamine.co.uk>
2778         PR c++/60390
2779         * parser.c (cp_parser_member_declaration): Don't allow
2780         finish_fully_implicit_template to consider friend declarations to be
2781         class member templates.
2782         (synthesize_implicit_template_parm): Handling winding back through class
2783         scope to the class being defined in order to inject a template argument
2784         list.
2786         PR c++/60391
2787         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2788         function scope as per cp_parser_skip_to_end_of_statement.
2790 2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
2792         PR c++/59571
2793         * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2795 2014-03-14  Jason Merrill  <jason@redhat.com>
2797         PR c++/60532
2798         PR c++/58678
2799         * search.c (get_pure_virtuals): Handle abstract dtor here.
2800         (dfs_get_pure_virtuals): Not here.
2802         PR c++/58678
2803         * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2804         abstract class as pure.
2806 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2808         PR c++/60383
2809         * pt.c (maybe_process_partial_specialization): Check return value
2810         of check_specialization_namespace.
2812 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2814         PR c++/60254
2815         * semantics.c (finish_static_assert): Call cxx_constant_value only
2816         if require_potential_rvalue_constant_expression returns true.
2818 2014-03-11  Paolo Carlini  <paolo.carlini@oracle.com>
2820         PR c++/60389
2821         * method.c (get_inherited_ctor): New.
2822         * cp-tree.h (get_inherited_ctor): Declare it.
2823         * semantics.c (is_valid_constexpr_fn): Use it.
2825 2014-03-10  Jason Merrill  <jason@redhat.com>
2827         PR c++/60367
2828         * call.c (convert_default_arg): Remove special handling for
2829         CONSTRUCTOR.
2831         PR c++/53492
2832         * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2833         when deciding whether to call push_template_decl for a member class.
2834         * pt.c (push_template_decl_real): Return after wrong levels error.
2836 2014-03-08  Adam Butcher  <adam@jessamine.co.uk>
2838         PR c++/60033
2839         * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2840         lambda, remove the lambda's own template argument list prior to fetching
2841         the specialization.
2843         PR c++/60393
2844         * parser.c (cp_parser_parameter_declaration_clause): Move generic
2845         function template unwinding on error into a more general location, ...
2846         (cp_parser_skip_to_end_of_statement): ... here.
2848 2014-03-07  Jason Merrill  <jason@redhat.com>
2850         * Make-lang.in (check_g++_parallelize): Split dg.exp.
2852         * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2853         we're in a trailing return type.
2855         * typeck.c (comp_template_parms_position): 'auto' and
2856         'decltype(auto)' are different from real template parms.
2858         * parser.c (cp_parser_using_declaration): Consume the semicolon
2859         after bare parameter pack error.
2861         * cp-tree.h (REF_PARENTHESIZED_P): New.
2862         * semantics.c (force_paren_expr): Set it.
2863         * pt.c (do_auto_deduction): Check it.
2864         (tsubst) [COMPONENT_REF]: Copy it.
2865         * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2867         * decl.c (create_array_type_for_decl): Only warn about invalid
2868         C++1y VLA if flag_iso or warn_vla>0.
2869         (grokdeclarator): Likewise.
2870         * pt.c (tsubst): Likewise.
2871         * semantics.c (finish_decltype_type): Likewise.
2872         * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2873         (cp_build_addr_expr_1): Likewise.
2874         * init.c (build_new_1): Improve diagnostics.
2876 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2878         PR c++/58609
2879         * decl.c (check_initializer): Return NULL_TREE after error;
2880         consistently use inform.
2882 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2884         * decl.c (check_initializer): Remove dead code.
2886 2014-03-06  Marek Polacek  <polacek@redhat.com>
2888         PR c/60197
2889         * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2890         of checking tree code.
2892 2014-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2894         * parser.c (cp_lexer_set_source_position): New.
2895         (cp_parser_mem_initializer): Use it.
2896         (cp_parser_postfix_open_square_expression): Likewise.
2897         (cp_parser_parenthesized_expression_list): Likewise.
2898         (cp_parser_new_initializer): Likewise.
2899         (cp_parser_jump_statement): Likewise.
2900         (cp_parser_initializer): Likewise.
2901         (cp_parser_functional_cast): Likewise.
2903 2014-03-05  Jason Merrill  <jason@redhat.com>
2905         PR c++/60409
2906         * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2907         dependent expression.
2909         PR c++/60361
2910         * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2911         if re-parsing might succeed.
2912         * semantics.c (finish_id_expression): Use of a parameter outside
2913         the function body is a parse error.
2915         * parser.c (cp_parser_mem_initializer): Set input_location
2916         properly for init-list warning.
2917         (cp_parser_postfix_open_square_expression): Likewise.
2918         (cp_parser_parenthesized_expression_list): Likewise.
2919         (cp_parser_new_initializer): Likewise.
2920         (cp_parser_jump_statement): Likewise.
2921         (cp_parser_initializer): Likewise.
2922         (cp_parser_functional_cast): Likewise.
2924 2014-03-04  Jason Merrill  <jason@redhat.com>
2926         PR c++/60417
2927         * typeck2.c (process_init_constructor_record): Set
2928         CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2930         PR c++/60415
2931         PR c++/54359
2932         * parser.c (cp_parser_direct_declarator): Set declarator to
2933         cp_error_declarator on invalid qualified-id.
2935 2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
2937         PR c++/60376
2938         * parser.c (cp_parser_using_declaration): Early return when
2939         cp_parser_nested_name_specifier errors out.
2941 2014-03-01  Adam Butcher  <adam@jessamine.co.uk>
2943         PR c++/60377
2944         * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2945         function scope on parse error in function parameter list.
2947 2014-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
2949         * method.c (implicitly_declare_fn): Remove redundant
2950         DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2951         * semantics.c (is_instantiation_of_constexpr): Likewise.
2952         * error.c (dump_function_decl): Likewise.
2954 2014-03-01  Jason Merrill  <jason@redhat.com>
2956         PR c++/60379
2957         * semantics.c (begin_maybe_infinite_loop): Use
2958         fold_non_dependent_expr_sfinae.
2960 2014-02-28  Jason Merrill  <jason@redhat.com>
2962         PR c++/58845
2963         * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2965 2014-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
2967         PR c++/58610
2968         * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2969         * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2970         * lambda.c (maybe_add_lambda_conv_op): Likewise.
2972 2014-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
2974         PR c++/60253
2975         * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2976         error_at.
2978 2014-02-27  Jason Merrill  <jason@redhat.com>
2980         PR c++/60353
2981         PR c++/55877
2982         * decl2.c (tentative_decl_linkage): Don't mess with functions that
2983         are not yet defined.
2985 2014-02-26  Jason Merrill  <jason@redhat.com>
2987         PR c++/60347
2988         PR lto/53808
2989         * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2990         * init.c (build_vtbl_address): Do it here.
2992         PR c++/59231
2993         PR c++/11586
2994         PR c++/14710
2995         PR c++/57132
2996         * pt.c (struct warning_sentinel): New.
2997         (tsubst_copy_and_build): Use it instead of
2998         c_inhibit_evaluation_warnings.
2999         * typeck.c (maybe_warn_about_useless_cast): Remove
3000         c_inhibit_evaluation_warnings check.
3002         PR c++/54440
3003         * pt.c (get_template_parm_index): New.
3004         (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
3005         (process_template_parm): Allow bare packs in template template
3006         parm template parms.
3007         (coerce_template_parameter_pack): Handle fixed template template
3008         parm packs and fixed packs not at the end of the parm list.
3009         (coerce_template_parms): Handle template parm packs not at the end
3010         of the parm list.
3011         (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
3013         PR c++/60182
3014         * pt.c (unify): Ignore alias templates when deducing a template
3015         template parameter.
3017         PR c++/60345
3018         Revert:
3019         DR 1571
3020         * call.c (reference_binding): Recurse on user-defined conversion.
3021         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3023 2014-02-25  Jason Merrill  <jason@redhat.com>
3025         DR 1571
3026         * call.c (reference_binding): Recurse on user-defined conversion.
3027         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3029         * call.c (print_conversion_rejection): Handle n_arg of -2.
3030         (build_user_type_conversion_1): Pass it.
3032         PR c++/55877
3033         * decl2.c (no_linkage_error): Handle C++98 semantics.
3034         (reset_type_linkage): Move from decl.c.
3035         (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3036         (bt_reset_linkage_2, reset_decl_linkage): New.
3037         (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3038         (cp_write_global_declarations): Move condition into no_linkage_error.
3039         * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3040         * semantics.c (expand_or_defer_fn_1): Factor out
3041         tentative_decl_linkage.
3042         * cp-tree.h: Adjust.
3044         * decl2.c (finish_static_data_member_decl): Diagnose static data
3045         member in unnamed class.
3046         * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3048         PR lto/53808
3049         * class.c (clone_function_decl): Call note_vague_linkage_fn for
3050         defaulted virtual dtor.
3052         DR 1286
3053         PR c++/60328
3054         * pt.c (get_underlying_template): Fix equivalence calculation.
3056 2014-02-25  Adam Butcher  <adam@jessamine.co.uk>
3058         PR c++/60311
3059         * parser.c (function_being_declared_is_template_p): Return false when
3060         processing a template parameter list.
3061         (cp_parser_parameter_declaration_clause): Don't set
3062         auto_is_implicit_function_template_parm_p when processing a
3063         template parameter list.
3065         * parser.c (synthesize_implicit_template_parm): Inject new template
3066         argument list appropriately when a generic member function
3067         of a class template is declared out-of-line.
3069         PR c++/60065
3070         * parser.c (cp_parser_direct_declarator): Don't save and
3071         restore num_template_parameter_lists around call to
3072         cp_parser_parameter_declaration_list.
3073         (function_being_declared_is_template_p): New predicate.
3074         (cp_parser_parameter_declaration_list): Use
3075         function_being_declared_is_template_p as predicate for
3076         inspecting current function template parameter list length
3077         rather than num_template_parameter_lists.
3079 2014-02-24  Jason Merrill  <jason@redhat.com>
3081         PR c++/60146
3082         * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3083         DECL_EXPR initialize a non-class iterator.
3085         PR c++/60312
3086         * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3088 2014-02-21  Jason Merrill  <jason@redhat.com>
3090         PR c++/58170
3091         * parser.c (cp_parser_type_name): Always check dependency.
3092         (cp_parser_type_specifier_seq): Call
3093         cp_parser_parse_and_diagnose_invalid_type_name.
3095         PR c++/60108
3096         * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3098         PR c++/60185
3099         * parser.c (cp_parser_default_argument): Clear
3100         current_class_ptr/current_class_ref like tsubst_default_argument.
3102         PR c++/60252
3103         * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3104         than current_binding_level.
3106         PR c++/60186
3107         * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3109         PR c++/60187
3110         * parser.c (cp_parser_enum_specifier): Call
3111         check_for_bare_parameter_packs.
3113         PR c++/59347
3114         * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3115         erroneous typedef.
3117         PR c++/60241
3118         * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3119         of the partial instantiation, not the most general template.
3120         (maybe_process_partial_specialization): Reassign everything on
3121         that list.
3123         PR c++/60216
3124         * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3125         (check_explicit_specialization): Don't clone.
3127         PR c++/60219
3128         * pt.c (coerce_template_parms): Bail if argument packing fails.
3130         PR c++/60224
3131         * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3132         Don't get confused by a CONSTRUCTOR that already has a type.
3134         PR c++/60227
3135         * call.c (build_array_conv): Don't crash on VLA.
3137         PR c++/60248
3138         * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3140         PR c++/60252
3141         * lambda.c (maybe_resolve_dummy): Don't try to capture this
3142         in declaration context.
3144         DR 1591
3145         PR c++/60051
3146         * pt.c (unify): Only unify if deducible.  Handle 0-length list.
3148         PR c++/60250
3149         * parser.c (cp_parser_direct_declarator): Don't wrap a
3150         type-dependent expression in a NOP_EXPR.
3152         PR c++/60251
3153         * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3155         PR c++/60167
3156         PR c++/60222
3157         PR c++/58606
3158         * parser.c (cp_parser_template_argument): Restore dereference.
3159         * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3160         (process_partial_specialization): Handle deref.
3161         (unify): Likewise.
3163 2014-02-21  Adam Butcher  <adam@jessamine.co.uk>
3165         PR c++/60052
3166         PR c++/60053
3167         * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3168         implicit_template_scope upon leaving an out-of-line generic member
3169         function definition.
3171 2014-02-20  Kai Tietz  <ktietz@redhat.com>
3173         PR c++/58873
3174         * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3175         valued type argument as error_mark_node.
3177         PR c++/58835
3178         * semantics.c (finish_fname): Handle error_mark_node.
3180 2014-02-19  Jason Merrill  <jason@redhat.com>
3182         PR c++/60046
3183         * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3184         spec from template context.
3186 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
3188         PR debug/56563
3189         * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3190         FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3192         PR c++/60267
3193         * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3195 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
3197         PR c++/60225
3198         * semantics.c (ensure_literal_type_for_constexpr_object): Use
3199         strip_array_types.
3201 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
3203         PR c++/60215
3204         * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3205         During error recovery allow_non_constant may be false.
3207 2014-02-18  Adam Butcher  <adam@jessamine.co.uk>
3209         PR c++/60190
3210         * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3211         scope whenever a template parameter list has been started, independent
3212         of whether the function call operator was well-formed or not.
3214         PR c++/60064
3215         * parser.c (cp_parser_member_declaration): Pop fully implicit template
3216         scope for generic friend declarations as well as for non-friends.
3218 2014-02-12  Paolo Carlini  <paolo.carlini@oracle.com>
3220         PR c++/60047
3221         * method.c (implicitly_declare_fn): A constructor of a class with
3222         virtual base classes isn't constexpr (7.1.5p4).
3224 2014-02-05  Jan Hubicka  <hubicka@ucw.cz
3226         * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3228 2014-02-05  Jakub Jelinek  <jakub@redhat.com>
3230         PR c++/58703
3231         * parser.c (cp_parser_omp_declare_reduction): Save and free
3232         declarator_obstack.
3234 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
3236         PR c++/53017
3237         PR c++/59211
3238         * tree.c (handle_init_priority_attribute): Call default_conversion on
3239         the attribute argument.
3241 2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
3243         PR c++/58871
3244         * method.c (synthesized_method_walk): If vbases is non-null but
3245         is_empty is true, likewise don't worry about the virtual bases.
3247 2014-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
3249         PR c++/51219
3250         * typeck2.c (process_init_constructor_record): Just skip unnamed
3251         bit-fields.
3253 2014-01-31  Jason Merrill  <jason@redhat.com>
3255         PR c++/59469
3256         * pt.c (mark_decl_instantiated): Call mark_needed.
3258         PR c++/58672
3259         * decl2.c (handle_tls_init): Handle null init fn.
3261         PR c++/55800
3262         * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3264 2014-01-31  Paolo Carlini  <paolo.carlini@oracle.com>
3266         PR c++/59082
3267         * class.c (build_vfield_ref): Early return error_mark_node if
3268         TYPE_VFIELD (type) is null.
3269         (build_base_path): Check return value of build_vfield_ref.
3271 2014-01-31  Jason Merrill  <jason@redhat.com>
3273         PR c++/59646
3274         * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3275         [ck_list]: Check for error_mark_node.
3276         (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3278         PR c++/57043
3279         * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3280         during partial ordering.
3282 2014-01-31  Marek Polacek  <polacek@redhat.com>
3284         PR c/59963
3285         * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3287 2014-01-30  Jason Merrill  <jason@redhat.com>
3289         PR c++/57899
3290         * cp-tree.h (struct saved_scope): Add x_local_specializations.
3291         (local_specializations): New macro.
3292         * pt.c (local_specializations): Remove variable.
3294 2014-01-30  Richard Sandiford  <rdsandiford@googlemail.com>
3296         PR c++/58708
3297         * parser.c (make_string_pack): Use double_int::from_buffer.
3299 2014-01-30  Marek Polacek  <polacek@redhat.com>
3301         PR c/59940
3302         * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3303         input_location.
3304         * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3305         with input_location.
3306         * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3307         loc parameter.
3309 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3311         PR c++/58843
3312         * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3314 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3316         PR c++/58649
3317         * pt.c (lookup_template_class_1): Check start_enum return value
3318         for error_mark_node.
3320 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
3322         * decl.c (duplicate_decls, typename_hash, typename_compare):
3323         Use TYPE_IDENTIFIER.
3324         * error.c (dump_type): Likewise.
3325         * mangle.c (dump_substitution_candidates): Likewise.
3327 2014-01-30  Jason Merrill  <jason@redhat.com>
3329         PR c++/59633
3330         * decl2.c (attributes_naming_typedef_ok): New.
3331         * cp-tree.h: Declare it.
3332         * decl.c (grokdeclarator): Check it.
3333         * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3335 2014-01-29  Jason Merrill  <jason@redhat.com>
3337         PR c++/59707
3338         * call.c (add_builtin_candidate): Catch dependent types.
3340         PR c++/59989
3341         * pt.c (expand_template_argument_pack): Correct
3342         non_default_args_count calculation.
3344         PR c++/58466
3345         * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3347         PR c++/59956
3348         * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3349         have a friend template in a class template.
3350         * pt.c (tsubst_friend_function): Look through it.
3351         (push_template_decl_real): A friend member template is
3352         primary.
3354 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3356         PR c++/58846
3357         * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3358         == error_mark_node.
3360 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3362         PR c++/58674
3363         * pt.c (instantiate_template_1): Check for error_mark_node the second
3364         argument too.
3366 2014-01-29  Jason Merrill  <jason@redhat.com>
3368         PR c++/59916
3369         * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3370         cdtor_returns_this case.
3372         PR c++/59315
3373         * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3375 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
3377         PR c++/58702
3378         * semantics.c (finish_omp_reduction_clause): Check type for
3379         error_mark_node.
3381 2014-01-28  Jason Merrill  <jason@redhat.com>
3383         PR c++/59791
3384         * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3385         (tsubst_copy): Use it if lookup fails.
3387         PR c++/59818
3388         * pt.c (tsubst_function_type): Make sure we keep the same function
3389         quals.
3391         PR c++/58701
3392         * semantics.c (build_anon_member_initialization): Stop walking
3393         when we run out of COMPONENT_REFs.
3395         PR c++/58632
3396         * decl.c (lookup_and_check_tag): Ignore template parameters if
3397         scope == ts_current.
3398         * pt.c (check_template_shadow): Don't complain about the injected
3399         class name.
3401         * decl.c (duplicate_decls): Tweak.
3403         PR c++/53756
3404         * mangle.c (write_unqualified_name): Handle operator auto.
3406 2014-01-27  Jason Merrill  <jason@redhat.com>
3408         PR c++/59823
3409         Core DR 1138
3410         * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3411         list-initialization.  A conversion to rvalue ref that involves
3412         an lvalue-rvalue conversion is bad.
3413         (convert_like_real): Give helpful error message.
3415         PR c++/54652
3416         * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3418         PR c++/58504
3419         * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3420         types.
3422         PR c++/58606
3423         * pt.c (template_parm_to_arg): Call convert_from_reference.
3424         (tsubst_template_arg): Don't strip reference refs.
3426         PR c++/58639
3427         * call.c (build_aggr_conv): Reject value-initialization of reference.
3429         PR c++/58812
3430         PR c++/58651
3431         * call.c (convert_like_real): Give helpful error about excess braces
3432         for ck_rvalue of scalar type.
3434         Core DR 1288
3435         * call.c (reference_binding): Only elide braces if the single
3436         element is reference-related.
3438         PR c++/58814
3439         * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3440         stabilizing.
3442         PR c++/58837
3443         * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3444         FUNCTION_DECL.
3446         PR c++/59097
3447         * decl.c (compute_array_index_type): Don't call
3448         maybe_constant_value for a non-integral expression.
3450 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3452         * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3453         flag_cilkplus.
3454         * cp-gimplify.c (cp_genericize): Likewise.
3455         * decl.c (grokfndecl): Likewise.
3456         * parser.c (cp_parser_postfix_expression): Likewise.
3457         (cp_parser_postfix_open_square_expression): Likewise.
3458         (cp_parser_direct_declarator): Likewise.
3459         (is_cilkplus_vector_p): Likewise.
3460         (cp_parser_omp_clause_name): Likewise.
3461         (cp_parser_omp_all_clauses): Likewise.
3462         * pt.c (apply_late_template_attributes): Likewise.
3463         * typeck.c (cp_build_array_ref): Likewise.
3464         (cp_build_compound_expr): Likewise.
3465         (check_return_expr): Likewise.
3467 2014-01-24  Jason Merrill  <jason@redhat.com>
3469         PR c++/58550
3470         * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3471         c++11 into error.
3473         PR c++/59886
3474         PR c++/59659
3475         * typeck2.c (process_init_constructor_array): Don't create
3476         RANGE_EXPR yet.
3478 2014-01-24  Jakub Jelinek  <jakub@redhat.com>
3480         * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3481         handling for RANGE_ARRAY case.
3483 2014-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
3485         PR c++/57524
3486         * name-lookup.c (push_using_directive): Use timevar_cond_start.
3488 2014-01-23  Marek Polacek  <polacek@redhat.com>
3490         PR c/59846
3491         * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3493 2014-01-23  Marek Polacek  <polacek@redhat.com>
3495         PR c/58346
3496         * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3497         an empty aggregate.
3499 2014-01-23  Jason Merrill  <jason@redhat.com>
3501         PR c++/55189
3502         * cp-tree.h (struct language_function): Add infinite_loop and
3503         infinite_loops.
3504         (current_function_infinite_loop): New.
3505         * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3506         (break_maybe_infinite_loop): New.
3507         (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3508         (finish_do_stmt, finish_for_cond, finish_for_stmt)
3509         (begin_range_for_stmt): Use them.
3510         * decl.c (finish_function): Don't warn about missing return
3511         if current_function_infinite_loop.
3512         * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3513         * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3515         * call.c (build_op_delete_call): Use make_tree_vector and
3516         release_tree_vector.
3518 2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
3520         PR c++/58980
3521         * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3522         nested_name_specifier.
3524 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3526         * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3527         see if there is an attribute after function decl.  If so, then
3528         parse them now.
3529         (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3530         enabled function late parsing.
3531         (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3532         attribute for a SIMD-enabled function.
3533         (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3534         the function is used by SIMD-enabled function (indicated by NULL
3535         pragma token).   Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3536         PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3537         (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3538         vectorlength clause in SIMD-enabled function and #pragma SIMD's
3539         vectorlength clause.  Added a new bool parameter to differentiate
3540         between the two.
3541         (cp_parser_cilk_simd_fn_vector_attrs): New function.
3542         (is_cilkplus_vector_p): Likewise.
3543         (cp_parser_late_parsing_elem_fn_info): Likewise.
3544         (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3545         and "vectorlength" clauses when Cilk Plus is enabled.
3546         (cp_parser_omp_clause_linear): Added a new parameter of type bool
3547         and emit a sorry message when step size is a parameter.
3548         * parser.h (cp_parser::cilk_simd_fn_info): New field.
3549         * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3550         flag_openmp.
3551         * pt.c (apply_late_template_attributes): Likewise.
3553 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3555         PR middle-end/58809
3556         * semantics.c (finish_omp_reduction_clause): Reject
3557         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3559 2014-01-22  Ville Voutilainen  <ville.voutilainen@gmail.com>
3561         PR c++/59482
3562         * parser.c (cp_parser_class_head): Push the class before parsing
3563         the base-clause, pop after it.
3565 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
3567         * decl2.c (cpp_check): Revert prototype change.
3569 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
3571         PR c++/59270
3572         PR c++/58811
3573         * init.c (build_value_init_noctor): Don't pass error_mark_node to
3574         build_value_init.
3576 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
3578         PR c++/59269
3579         * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3580         only when errorcount == 0.
3582 2014-01-17  Marek Polacek  <polacek@redhat.com>
3584         PR c++/59838
3585         * cvt.c (ocp_convert): Don't segfault on non-existing
3586         ENUM_UNDERLYING_TYPE.
3588 2014-01-16  Jason Merrill  <jason@redhat.com>
3590         PR c++/59821
3591         * tree.c (bot_manip): Update the location of builtin_LINE and
3592         builtin_FILE calls.
3594 2014-01-14  Jason Merrill  <jason@redhat.com>
3596         PR c++/59659
3597         * typeck2.c (massage_init_elt): New.
3598         (process_init_constructor_record)
3599         (process_init_constructor_union): Use it.
3600         (process_init_constructor_array): Use it.  Use RANGE_EXPR.
3601         (split_nonconstant_init_1): Handle it.
3602         * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3604 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3606         PR c++/59631
3607         * parser.c (cp_parser_postfix_expression): Added a new if-statement
3608         and replaced an existing if-statement with else-if statement.
3609         Changed an existing error message wording to match the one from the C
3610         parser.
3612 2014-01-08  Jason Merrill  <jason@redhat.com>
3614         PR c++/59614
3615         * class.c (abi_tag_data): Add tags field.
3616         (check_abi_tags): Initialize it.
3617         (find_abi_tags_r): Support collecting missing tags.
3618         (mark_type_abi_tags): Don't look at template args.
3619         (inherit_targ_abi_tags): New.
3620         (check_bases_and_members): Use it.
3621         * cp-tree.h (ABI_TAG_IMPLICIT): New.
3622         * mangle.c (write_abi_tags): Check it.
3624 2014-01-07  Jason Merrill  <jason@redhat.com>
3626         PR c++/58856
3627         * pt.c (num_innermost_template_parms): New.
3628         (get_underlying_template): Use it.
3630         PR c++/58965
3631         * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3633 2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
3635         * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3636         the letter of 20.11.6 about Base and Derived naming the same
3637         class type modulo cv-qualifiers.
3639 2014-01-06  Adam Butcher  <adam@jessamine.co.uk>
3641         PR c++/59635
3642         * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3643         function as unimplemented for generic lambdas with varargs.
3645         PR c++/59636
3646         * parser.c (cp_parser_template_parameter): Early out with
3647         error_mark_node if parameter declaration was not parsed.
3649         PR c++/59629
3650         * parser.c (cp_parser_lambda_expression): Save/reset/restore
3651         auto_is_implicit_function_template_parm_p around lambda body.
3653         PR c++/59638
3654         * parser.c (cp_parser_init_declarator): Undo fully implicit
3655         template parameter list when declarator is not a function.
3657 2014-01-03  Marc Glisse  <marc.glisse@inria.fr>
3659         PR c++/58950
3660         * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3662 2014-01-03  Tobias Burnus  <burnus@net-b.de>
3664         PR c++/58567
3665         * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3667 2014-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
3669         Core DR 1442
3670         PR c++/59165
3671         * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3672         as include_std to perform_koenig_lookup.
3673         (cp_parser_postfix_expression): Adjust.
3674         * pt.c (tsubst_copy_and_build): Likewise.
3675         * semantics.c (perform_koenig_lookup): Remove bool parameter.
3676         (omp_reduction_lookup): Adjust.
3677         * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3678         (lookup_arg_dependent): Likewise.
3679         (lookup_function_nonclass): Adjust.
3680         * name-lookup.h: Adjust declaration.
3681         * cp-tree.h: Likewise.
3683 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3685         PR c++/59087
3686         * parser.c (cp_parser_userdef_numeric_literal): Mention
3687         -fext-numeric-literals in the message.
3689 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3691         PR c++/59641
3692         * call.c (build_conditional_expr_1): Check the return value of
3693         force_rvalue.
3695 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3697         * call.c (convert_like_real): Check complain.
3699 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3701         PR c++/59378
3702         * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3703         in templates.
3705 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3707         Update copyright years
3709 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3711         * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3712         the standard form for the copyright notice.
3714 Copyright (C) 2014 Free Software Foundation, Inc.
3716 Copying and distribution of this file, with or without modification,
3717 are permitted in any medium without royalty provided the copyright
3718 notice and this notice are preserved.