PR c++/61539
[official-gcc.git] / gcc / cp / ChangeLog
blobf1212369d2fd12f06781c0e8ef06b397b9b87de6
1 2014-06-30  Jason Merrill  <jason@redhat.com>
3         PR c++/61539
4         * pt.c (unify_one_argument): Type/expression mismatch just causes
5         deduction failure.
7         * semantics.c (simplify_aggr_init_expr): Remove remnants of
8         2014-04-11 change.
10 2014-06-30  Marek Polacek  <polacek@redhat.com>
12         * cp-gimplify.c (cp_genericize): Don't instrument returns if the
13         function has no_sanitize_undefined attribute.
14         * decl.c (compute_array_index_type): Don't instrument VLAs if the
15         function has no_sanitize_undefined attribute.
17 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
19         PR middle-end/57541
20         * cp-array-notation.c (expand_sec_reduce_builtin):
21         Check that bultin argument is correct.
22         * call.c (build_cxx_call): Check for 0 arguments in builtin call.
24 2014-06-28  Jonathan Wakely  <jwakely@redhat.com>
26         DR 1579
27         PR c++/58051
28         * typeck.c (check_return_expr): Lookup as an rvalue even when the
29         types aren't the same.
31 2014-06-27  Jason Merrill  <jason@redhat.com>
33         PR c++/61433
34         * error.c (dump_template_bindings): Don't tsubst in a clone.
36 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
38         PR c++/61614
39         * semantics.c (finish_compound_literal): Revert r204228.
41 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
43         * parser.c (cp_parser_compound_literal_p): New.
44         (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
46 2014-06-26  Jason Merrill  <jason@redhat.com>
48         * parser.c (cp_parser_for_init_statement): Change range-for error
49         to pedwarn.
51         N3994 Ranged-based for-loops: The Next Generation
52         * parser.c (cp_lexer_nth_token_is): New.
53         (cp_parser_for_init_statement): Allow "for (id : init)".
55 2014-06-26  Adam Butcher  <adam@jessamine.co.uk>
57         PR c++/61537
58         * parser.c (cp_parser_elaborated_type_specifier): Only consider template
59         parameter lists outside of function parameter scope.
61 2014-06-25  Paolo Carlini  <paolo.carlini@oracle.com>
63         DR 178
64         PR c++/49132
65         * typeck2.c (process_init_constructor_record): Do not complain about
66         uninitialized const members, because within aggregate-initialization,
67         members without explicit initializers are value-initialized.
69 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
71         * semantics.c (finish_omp_clauses): Make sure
72         OMP_CLAUSE_LINEAR_STEP has correct type.
74 2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
76         * class.c (check_methods, create_vtable_ptr, determine_key_method,
77         add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
78         FUNCTION_DECL check.
79         * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
80         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
81         (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
82         (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
84 2014-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
86         PR c++/33972
87         * decl.c (grokdeclarator): Do not early check for operator-function-id
88         as non-function.
90 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
92         * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
93         Adjust.
95 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
97         * parser.c (cp_parser_omp_for_loop): For
98         #pragma omp parallel for simd move lastprivate clause from parallel
99         to for rather than simd.
101 2014-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
103         DR 577
104         PR c++/33101
105         * decl.c (grokparms): Accept a single parameter of type 'void'.
107 2014-06-20  Jason Merrill  <jason@redhat.com>
109         PR c++/59296
110         * call.c (add_function_candidate): Avoid special 'this' handling
111         if we have a ref-qualifier.
113         PR c++/61556
114         * call.c (build_over_call): Call build_this in template path.
116 2014-06-19  Jason Merrill  <jason@redhat.com>
118         PR c++/59296
119         * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
121 2014-06-18  Jason Merrill  <jason@redhat.com>
123         PR c++/59296
124         * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
125         ref-qualifier handling.
127         PR c++/61507
128         * pt.c (resolve_overloaded_unification): Preserve
129         ARGUMENT_PACK_EXPLICIT_ARGS.
131 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
133         * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
134         argument.
135         * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
137 2014-06-17  Jason Merrill  <jason@redhat.com>
139         PR c++/60605
140         * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
142 2014-06-15  Jason Merrill  <jason@redhat.com>
144         PR c++/61488
145         * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
147         PR c++/61500
148         * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
150 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
152         * decl.c (grokvardecl): Fix pasto in previous patch.
154 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
156         * decl.c (duplicate_decls): Use set_decl_tls_model.
157         (grokdeclarator): Likewise.
158         * semantics.c (finish_id_expression): Check TLS only for
159         static variables.
160         (finish_omp_threadprivate): Use decl_default_tls_model.
161         * decl2.c (get_guard): Likewise.
162         * call.c (make_temporary_var_for_ref_to_temp): Likewise.
164 2014-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
166         PR c++/33101
167         * decl.c (grokparms): Improve error message about void parameters.
168         * error.c (type_to_string): Fix aka cut off code.
170 2014-06-12  Jason Merrill  <jason@redhat.com>
172         * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
173         * cvt.c (type_promotes_to): Likewise.
174         * mangle.c (write_type, write_expression): Likewise.
175         (write_name, write_template_arg): Likewise.
176         (mangle_decl): Make alias based on flag_abi_compat_version.
177         Emit -Wabi warning here.
178         (finish_mangling_internal): Not here.  Drop warn parm.
179         (finish_mangling_get_identifier, finish_mangling): Adjust.
180         (mangle_type_string, mangle_special_for_type): Adjust.
181         (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
182         (mangle_guard_variable, mangle_tls_init_fn): Adjust.
183         (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
185         * call.c (build_operator_new_call): Remove -fabi-version=1 support.
186         * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
187         (layout_nonempty_base_or_field, end_of_class): Likewise.
188         (layout_empty_base, build_base_field, layout_class_type): Likewise.
189         (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
190         (layout_virtual_bases): Likewise.
191         * decl.c (compute_array_index_type): Likewise.
192         * mangle.c (write_mangled_name, write_prefix): Likewise.
193         (write_template_prefix, write_integer_cst, write_expression): Likewise.
194         (write_template_arg, write_array_type): Likewise.
195         * method.c (lazily_declare_fn): Likewise.
196         * rtti.c (get_pseudo_ti_index): Likewise.
197         * typeck.c (comp_array_types): Likewise.
199 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
201         * vtable-class-hierarchy.c: Update handling for section names
202         that are no longer trees.
203         * decl.c (duplicate_decls): Likewise.
205 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
207         PR c++/19200
208         * parser.c (cp_parser_init_declarator): Actually pass friend_p
209         to cp_parser_declarator.
211 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
213         PR c++/60265
214         * parser.c (cp_parser_using_declaration): Handle unscoped enums.
215         * name-lookup.c (validate_nonmember_using_decl): Adjust error
216         message.
218 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
220         PR c++/19200
221         * parser.c (cp_parser_declarator): Add bool parameter.
222         (cp_parser_direct_declarator): Likewise, use it.
223         (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
224         (cp_parser_condition, cp_parser_explicit_instantiation,
225         cp_parser_init_declarator, cp_parser_type_id_1,
226         cp_parser_parameter_declaration, cp_parser_exception_declaration,
227         cp_parser_cache_defarg, cp_parser_objc_class_ivars,
228         cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
229         Adjust.
230         * decl.c (grokdeclarator): Fix handling of friend declared in
231         namespace scope (g++.dg/parse/friend10.C).
233 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
235         * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
236         ->implicit_section.
237         * optimize.c (cdtor_comdat_group): Fix handling of aliases.
238         (maybe_clone_body): Move symbol across comdat groups.
239         * method.c (use_thunk): Copy implicit section flag.
241 2014-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
243         PR c++/22556
244         * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
246 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
248         * method.c (use_thunk): Use set_decl_section_name.
249         * optimize.c (maybe_clone_body): Use set_decl_section_name.
250         * decl.c (duplicate_decls): Likewise.
251         * vtable-class-hierarchy.c: Likewise.
253 2014-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
255         PR c++/60184
256         * class.c (check_field_decls): In C++11 mode do not reject
257         static data members and reference-type members in unions.
259 2014-06-05  Jason Merrill  <jason@redhat.com>
261         PR c++/43453
262         * decl.c (check_initializer): Collapse a TREE_LIST here.
263         * typeck2.c (store_init_value): Not here.
265 2014-06-05  Richard Biener  <rguenther@suse.de>
266             Paolo Carlini  <paolo.carlini@oracle.com>
268         PR c++/56961
269         * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
270         handling of empty classes.
272 2014-06-04  Jason Merrill  <jason@redhat.com>
274         * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
275         for noexcept and thread_local, too.
277         PR c++/61343
278         * decl.c (check_initializer): Maybe clear
279         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
281 2014-06-05  Richard Biener  <rguenther@suse.de>
283         PR c++/61004
284         * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
285         warnings for accessing empty classes.
287 2014-06-05  Marek Polacek  <polacek@redhat.com>
289         PR c/49706
290         * parser.c (cp_parser_binary_expression): Warn when logical not is
291         used on the left hand side operand of a comparison.
293 2014-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
295         PR c++/43453
296         * typeck.c (cp_build_modify_expr): Handle array of characters
297         initialized by a string literal.
298         * decl.c (check_initializer): Handle parenthesized string literal
299         as initializer.
300         * typeck2.c (store_init_value): Remove redundant check.
302 2014-06-04  Jason Merrill  <jason@redhat.com>
304         PR c++/51253
305         PR c++/61382
306         * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
307         * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
309 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
311         PR c/58942
312         * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
313         with a pointer.
315 2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
317         DR 1423
318         PR c++/52174
319         * call.c (standard_conversion): Convert nullptr to bool only
320         in case of direct-initialization.
321         (convert_like_real): Provide informative error message.
323 2014-06-03  Marek Polacek  <polacek@redhat.com>
325         PR c/60439
326         * semantics.c (finish_switch_cond): Warn if switch condition has
327         boolean value.
329 2014-06-03  Jason Merrill  <jason@redhat.com>
331         PR c++/60992
332         * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first.  Add a new
333         variable to local_specializations.
335         PR c++/60848
336         * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
338 2014-06-02  Jason Merrill  <jason@redhat.com>
340         PR c++/61046
341         * decl.c (reshape_init_class): Handle un-folded
342         constant-expressions.
344         PR c++/61134
345         * pt.c (pack_deducible_p): Handle canonicalization.
347 2014-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
349         * pt.c (tsubst_function_type): Initialize arg_types.
351 2014-06-02  Siva Chandra Reddy  <sivachandra@google.com>
353         PR debug/57519
354         * class.c (handle_using_decl): Pass the correct scope to
355         cp_emit_debug_info_for_using.
357 2014-06-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
359         PR c++/59483
360         PR c++/61148
361         * search.c (accessible_p): Use current_nonlambda_class_type.
362         * semantics.c (check_accessibility_of_qualified_id): Likewise.
364 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
366         * decl.c: Include builtins.h.
367         * semantics.c: Likewise.
369 2014-05-31  Paolo Carlini  <paolo.carlini@oracle.com>
371         DR 1227
372         PR c++/57543
373         * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
374         * pt.c (tsubst_function_type): Inject the this parameter; do the
375         substitutions in the order mandated by the DR.
376         (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
377         * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
378         (static_fn_type): Copy it.
379         * decl2.c (build_memfn_type, change_return_type,
380         cp_reconstruct_complex_type): Likewise.
381         * parser.c (cp_parser_lambda_declarator_opt): Likewise.
382         * tree.c (strip_typedefs): Likewise.
383         * typeck.c (merge_types): Likewise.
385 2014-05-30  Jason Merrill  <jason@redhat.com>
387         PR c++/56947
388         * pt.c (instantiate_decl): Check that defer_ok is not set for
389         local class members.
391         PR c++/60992
392         * pt.c (tsubst_init): Split out from...
393         (tsubst_expr) [DECL_EXPR]: Here.
394         (tsubst_copy) [VAR_DECL]: Use it.
395         * semantics.c (finish_id_expression): Return the decl for static/const.
397 2014-05-28  Jason Merrill  <jason@redhat.com>
399         PR c++/47202
400         * decl.c (cxx_comdat_group): Return a decl.
401         * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
403         * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
404         bound.
406         PR c++/61242
407         * call.c (build_aggr_conv): Ignore passed in flags.
408         (build_array_conv, build_complex_conv): Likewise.
410 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
412         * optimize.c (maybe_thunk_body): Use set_comdat_group.
413         (maybe_clone_body): Likewise.
414         * decl.c (duplicate_decls): Update code duplicating comdat group;
415         do not copy symtab pointer; before freeing newdecl remove it
416         from symtab.
417         * decl2.c (constrain_visibility): Use set_comdat_group.
419 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
421         * rtti.c: Include tm_p.h
422         (emit_tinfo_decl): Force RTTI data to be aligned to required
423         ABI alignment only.
425 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
427         * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
428         ignoring other target adjustments.
430 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
432         * semantics.c (finish_omp_clauses): Remove duplicated variable
433         initialization.
435         * parser.c (cp_parser_omp_target): Return bool values.
437 2014-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
439         PR c++/61088
440         * lambda.c (add_capture): Enforce that capture by value requires
441         complete type.
442         * typeck2.c (cxx_incomplete_type_inform): Early return if
443         TYPE_MAIN_DECL is null.
445 2014-05-21  Jonathan Wakely  <jwakely@redhat.com>
447         PR c/61271
448         * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
450 2014-05-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
452         PR c++/61133
453         * lambda.c (build_capture_proxy, add_capture): Treat normal
454         captures and init-captures identically.
456 2014-05-21  Mark Wielaard  <mjw@redhat.com>
458         PR debug/16063
459         * cp-lang.c (cxx_enum_underlying_base_type): New function.
460         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
462 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
464         * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
465         * cp-array-notation.c (replace_invariant_exprs): Likewise.
466         (expand_array_notation): Handle VOID_CST.
467         * error.c (dump_expr): Likewise.
468         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
469         (cxx_pretty_printer::expression): Likewise.
470         (pp_cxx_new_expression): Use void_node instead of void_zero_node.
471         * decl.c (register_dtor_fn): Likewise.
472         * init.c (build_raw_new_expr, build_new_1, build_vec_init)
473         (build_delete, push_base_cleanups): Likewise.
474         * mangle.c (write_expression): Likewise.
475         * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
476         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
477         (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
478         * tree.c (cp_tree_equal): Likewise.
479         (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
480         instead of void_zero_node.
481         * typeck.c (check_return_expr): Likewise.
482         * typeck2.c (build_functional_cast): Likewise.
484 2014-05-21  Igor Zamyatin  <igor.zamyatin@intel.com>
486         PR c/60189
487         * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
488         from here to...
489         (cp_parser_statement): ...here. Make sure only semicolon can go after
490         Cilk_sync.
492 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
494         PR c++/58753
495         PR c++/58930
496         PR c++/58704
497         * typeck2.c (digest_nsdmi_init): New.
498         * parser.c (cp_parser_late_parse_one_default_arg): Use it.
499         * init.c (get_nsdmi): Likewise.
500         * cp-tree.h (digest_nsdmi_init): Declare.
502 2014-05-20  Jason Merrill  <jason@redhat.com>
504         * typeck.c (get_member_function_from_ptrfunc): Don't try to look
505         up a virtual function in a dummy object.
507 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
509         PR c++/60373
510         * decl.c (duplicate_decls): Replace pair of warning_at with
511         warning_at + inform.
512         (maybe_commonize_var): Likewise.
514 2014-05-20  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
516         PR bootstrap/61210
517         * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
518         (tsubst_copy_and_build): Perform recursive substitutions in a
519         deterministic order.
521 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
523         PR c++/58664
524         * typeck2.c (cxx_incomplete_type_inform): New.
525         (cxx_incomplete_type_diagnostic): Use it.
526         * decl.c (grokdeclarator): Check the element type of an
527         incomplete array type; call the above.
528         * cp-tree.h (cxx_incomplete_type_inform): Declare.
530 2014-05-19  Jason Merrill  <jason@redhat.com>
532         PR c++/58761
533         * pt.c (tsubst_copy): Don't check at_function_scope_p.
534         (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
536 2014-05-19  Paolo Carlini  <paolo.carlini@oracle.com>
538         * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
539         * parser.c (cp_parser_enum_specifier): Likewise.
541 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
543         * class.c (sorted_fields_type_new): Adjust.
544         * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
545         * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
546         * cp-tree.h: Remove usage of variable_size gty attribute.
547         * decl.c (make_label_decl): Adjust.
548         (check_goto): Likewise.
549         (start_preparsed_function): Likewise.
550         (save_function_data): Likewise.
551         * lex.c (init_reswords): Likewise.
552         (retrofit_lang_decl): Likewise.
553         (cxx_dup_lang_specific_decl): Likewise.
554         (copy_lang_type): Likewise.
555         (cxx_make_type): Likewise.
556         * name-lookup.c (binding_entry_make): Likewise.
557         (binding_table_construct): Likewise.
558         (binding_table_new): Likewise.
559         (cxx_binding_make): Likewise.
560         (pushdecl_maybe_friend_1): Likewise.
561         (begin_scope): Likewise.
562         (push_to_top_level): Likewise.
563         * parser.c (cp_lexer_alloc): Likewise.
564         (cp_lexer_new_from_tokens): Likewise.
565         (cp_token_cache_new): Likewise.
566         (cp_parser_context_new): Likewise.
567         (cp_parser_new): Likewise.
568         (cp_parser_nested_name_specifier_opt): Likewise.
569         (cp_parser_template_id): Likewise.
570         * pt.c (maybe_process_partial_specialization): Likewise.
571         (register_specialization): Likewise.
572         (add_pending_template): Likewise.
573         (lookup_template_class_1): Likewise.
574         (push_tinst_level): Likewise.
575         * semantics.c (register_constexpr_fundef): Likewise.
576         (cxx_eval_call_expression): Likewise.
577         * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
579 2014-05-16  Paolo Carlini  <paolo.carlini@oracle.com>
581         PR c++/51640
582         * parser.c (cp_parser_diagnose_invalid_type_name): Early return
583         when cp_parser_lookup_name sets ambiguous_decls.
585 2014-05-15  Jason Merrill  <jason@redhat.com>
587         * call.c (print_conversion_rejection): Use loc consistently.
589 2014-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
591         * cp-tree.h (DIRECT_LIST_INIT_P): Add.
592         * call.c (convert_like_real, build_new_method_call_1): Use it.
593         * decl2.c (grokfield): Likewise.
594         * init.c (perform_member_init, build_aggr_init, expand_default_init,
595         build_new_1): Likewise.
596         * mangle.c (write_expression): Likewise.
597         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
599 2014-05-14  Jason Merrill  <jason@redhat.com>
601         PR c++/20332
602         PR c++/21631
603         * call.c (reference_binding): Treat lvalue/rvalue mismatch and
604         dropped cv-quals as a bad conversion.
605         (convert_like_real) [ck_ref_bind]: Explain them.
606         (compare_ics): Check badness before stripping reference
607         bindings.  Handle comparing bad reference bindings.
608         * typeck.c (comp_cv_qualification): Add overload that just takes
609         integers.
610         * cp-tree.h: Declare it.
612         * call.c (struct conversion_info): Rename 'from_type' to 'from'.
613         (arg_conversion_rejection, bad_arg_conversion_rejection)
614         (explicit_conversion_rejection, template_conversion_rejection): Adjust.
615         (add_function_candidate): Pass actual argument, rather than type, to
616         bad_arg_conversion_rejection.
617         (print_conversion_rejection): Explain what's wrong with the conversion.
618         (print_z_candidates): Say "candidate:" before each candidate.
619         (splice_viable): Be strict if we see a viable or template candidate.
620         (build_user_type_conversion_1): Pass false to strict parameter.
621         (perform_overload_resolution, build_conditional_expr_1): Likewise.
622         (build_new_op_1, build_new_method_call_1): Likewise.
623         (build_op_call_1): Pass true to strict parameter.
625 2014-05-13  Jason Merrill  <jason@redhat.com>
627         * call.c (print_error_for_call_failure): Say "no match" rather
628         than "ambiguous" if there were no strict matches.
629         (build_new_method_call_1): Likewise.
631         PR c++/61151
632         * semantics.c (is_this_parameter): Allow capture proxies too.
634 2014-05-12  Jason Merrill  <jason@redhat.com>
636         * call.c (maybe_print_user_conv_context): New.
637         (convert_like_real): Use it.  Print call context for bad
638         user-defined conversion.
639         (build_over_call): Print call context for bad 'this' conversion.
641         * call.c (convert_like_real): Use inform for identifying the
642         declaration point.
644 2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
646         * cvt.c (cp_convert_to_pointer): Don't call error_at if
647         complain & tf_error is false.
649         * decl.c (make_unbound_class_template): Prefer inform for
650         "declared here"-type message.
652 2014-05-09  Momchil Velikov  <momchil.velikov@gmail.com>
654         PR c++/60463
655         PR c++/60755
656         * lambda.c (lambda_expr_this_capture): Add new parameter
657         add_capture_p controlling whether the functions will try to
658         capture 'this' via the default capture.
659         (maybe_resolve_dummy): Likewise.
660         * cp-tree.h: Adjust prototypes.
661         * call.c, semantics.c: Change callers of these functions.
662         * call.c (build_new_method_call_1): Use the actual 'this' that
663         would be potentially captured for the overload resolution, instead
664         of the dummy object.
666 2014-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
668         * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
669         parameter.
670         (convert_nontype_argument): Adjust calls.
671         (coerce_template_parameter_pack): Add missing complain & tf_error
672         check.
674 2014-05-09  Jason Merrill  <jason@redhat.com>
676         DR 587
677         PR c++/51317
678         * call.c (build_conditional_expr_1, conditional_conversion): Handle
679         non-class lvalues and xvalues that differ only in cv-qualifiers.
681         DR 5
682         PR c++/60019
683         * call.c (build_user_type_conversion_1): The copy-init temporary
684         is cv-unqualified.
686         PR c++/58714
687         * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
689         PR c++/54348
690         * call.c (build_conditional_expr_1): If overload resolution finds
691         no match, just say "different types".
693         PR c++/32019
694         * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
696         PR c++/22434
697         * call.c (build_conditional_expr_1): Don't try to pool cv-quals
698         if we didn't find a conversion.
699         Don't accept a bad conversion too early.
701 2014-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
703         PR c++/13981
704         * typeck.c (convert_for_assignment): Provide an inform for pointers
705         to incomplete class types.
707 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
709         PR c++/61083
710         * pt.c (convert_nontype_argument): Protect all the error calls
711         with complain & tf_error.
713 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
715         PR c++/61080
716         * pt.c (instantiate_decl): Avoid generating the body of a
717         deleted function.
719 2014-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
721         PR c++/60999
722         * pt.c (maybe_begin_member_template_processing): Use
723         uses_template_parms.
725 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
726             Mike Stump  <mikestump@comcast.net>
727             Richard Sandiford  <rdsandiford@googlemail.com>
729         * call.c: Include wide-int.h.
730         (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
731         (convert_for_arg_passing): Likewise.
732         * class.c: Include wide-int.h.
733         (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
734         (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
735         (include_empty_classes): Likewise
736         (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
737         * cvt.c: Include wide-int.h.
738         (ignore_overflows): Use wide_int_to_tree.
739         * decl.c: Include wide-int.h.
740         (check_array_designated_initializer): Use wide-int interfaces.
741         (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
742         (finish_enum_value_list): Use signop.
743         (build_enumerator): Use wide-int interfaces.
744         * init.c: Include wide-int.h.
745         (build_new_1): Use wide-int interfaces.
746         * mangle.c: Include wide-int.h.
747         (write_integer_cst): Use wide-int interfaces.
748         (write_array_type): Likewise.
749         * tree.c: Include wide-int.h.
750         (cp_tree_equal): Use tree_int_cst_equal.
751         * typeck2.c: Include wide-int.h.
752         (process_init_constructor_array): Use wide-int interfaces.
754 2014-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
756         PR c++/58582
757         * decl.c (grokfndecl): Check duplicate_decls return value for
758         error_mark_node.
759         * pt.c (instantiate_decl): A deleted function is defined.
761 2014-05-02  Jason Merrill  <jason@redhat.com>
763         * decl2.c (vague_linkage_p): Local statics have vague linkage.
765         PR c++/60992
766         * lambda.c (lambda_capture_field_type): Wrap anything dependent
767         other than 'this'.
768         (add_capture): Check for VLA before calling it.
769         * semantics.c (is_this_parameter): Accept any 'this' parameter, not
770         just the current one.  Make non-static.
771         * cp-tree.h: Declare it.
772         * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
773         the operand was static or constant.
775 2014-05-02  Marek Polacek  <polacek@redhat.com>
777         * typeck.c (maybe_warn_about_returning_address_of_local): Separate
778         warning_at calls.
780 2014-05-01  Marek Polacek  <polacek@redhat.com>
782         PR c/43395
783         * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
784         between label and variable when warning about returning local address.
786 2014-04-30  Jason Merrill  <jason@redhat.com>
788         PR c++/60980
789         * init.c (build_value_init): Don't try to call an array constructor.
791         PR c++/60951
792         * typeck2.c (massage_init_elt): Use maybe_constant_init.
794 2014-04-30  Marek Polacek  <polacek@redhat.com>
796         * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
797         even when SANITIZE_FLOAT_DIVIDE is on.  Set doing_div_or_mod even
798         for non-integer types.
800 2014-04-29  Jason Merrill  <jason@redhat.com>
802         DR 1351
803         Represent the unevaluated exception specification of an implicitly
804         declared or deleted function with a simple placeholder, not a list
805         of functions.
806         * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
807         * except.c (unevaluated_noexcept_spec): New.
808         * class.c (deduce_noexcept_on_destructor): Use it.
809         * decl.c (check_redeclaration_exception_specification): Call
810         maybe_instantiate_noexcept.
811         (duplicate_decls): Call it before merge_types.
812         (start_preparsed_function): Call maybe_instantiate_noexcept.
813         * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
814         * init.c (get_nsdmi): Factor out of perform_member_init.
815         * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
816         (walk_field_subobs): Consider NSDMI for EH spec.
817         (get_defaulted_eh_spec): New.
818         (implicitly_declare_fn): Use unevaluated_noexcept_spec.
819         (defaulted_late_check): Defer EH checking in non-template classes.
820         (after_nsdmi_defaulted_late_checks): New.
821         * parser.c (cp_parser_class_specifier_1): Use it.
822         (unparsed_classes): New macro.
823         * parser.h (cp_unparsed_functions_entry_d): Add classes field.
824         * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
825         Remove list-of-functions handling.
826         * typeck2.c (merge_exception_specifiers): Remove list-of-functions
827         handling and FN parameter.
828         * typeck.c (merge_types): Adjust.
830 2014-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
832         PR c++/59120
833         * parser.c (cp_parser_alias_declaration): Check return value of
834         cp_parser_require.
836 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
838         * parser.c (cp_parser_omp_atomic): Allow seq_cst before
839         atomic-clause, allow comma in between atomic-clause and
840         seq_cst.
842 2014-04-24  Marc Glisse  <marc.glisse@inria.fr>
844         PR libstdc++/43622
845         * rtti.c (emit_support_tinfos): Do not iterate on
846         registered_builtin_types (partial revert).
848 2014-04-23 Dinar Temirbulatov  <dtemirbulatov@gmail.com>
850         PR c++/57958
851         * semantics.c (apply_deduced_return_type): Complete non-void type
852         before estimating whether the type is aggregate.
854 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
856         PR libstdc++/43622
857         * rtti.c (emit_support_tinfo_1): New function, extracted from
858         emit_support_tinfos.
859         (emit_support_tinfos): Call it and iterate on registered_builtin_types.
861 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
863         PR c/59073
864         * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
865         fails, don't set OM_PARALLEL_COMBINED and return NULL.
867 2014-04-18  Jason Merrill  <jason@redhat.com>
869         DR 1571
870         * call.c (reference_binding): Recurse on user-defined conversion.
872         PR c++/60872
873         * call.c (standard_conversion): Don't try to apply restrict to void.
875 2014-04-16  Marc Glisse  <marc.glisse@inria.fr>
877         * decl.c (reshape_init_r): Handle a single element of vector type.
879 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
881         PR c++/60765
882         * decl2.c (cplus_decl_attributes): Handle
883         pointer-to-member-function declarations.
885 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
887         PR c++/60764
888         * call.c (build_user_type_coversion): Use build_dummy_object
889         to create the placeholder object for a constructor method call.
890         (build_special_member_call): Likewise.
891         (build_over_call): Check for the placeholder object with
892         is_dummy_object.
893         (build_new_method_call_1): Likewise.  Don't attempt to resolve
894         a dummy object for a constructor method call.
896 2014-04-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
898         PR c++/59295
899         * friend.c (add_friend, make_friend_class): Move repeated friend
900         warning under Wredundant_decls.
902 2014-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
904         * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
905         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
906         (do_class_using_decl): Likewise.
907         * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
909 2014-04-15  Jakub Jelinek  <jakub@redhat.com>
911         PR plugins/59335
912         * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
914 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
916         * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
918 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
920         * pt.c (mark_template_parm): Use template_parm_level_and_index.
922 2014-04-11  Jason Merrill  <jason@redhat.com>
924         * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
925         * parser.c: Adjust.
926         (cp_lexer_get_preprocessor_token): Always clear it.
927         (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
929         DR 1467
930         PR c++/51747
931         * decl.c (reshape_init_r): Handle a single element of class type.
933         DR 1338
934         * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
935         built-in operator new.
937 2014-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
939         PR c++/58600
940         * name-lookup.c (parse_using_directive): Return early if the
941         attribs argument is error_mark_node; use get_attribute_name.
943 2014-04-11  Jason Merrill  <jason@redhat.com>
945         DR 1030
946         PR c++/51253
947         * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
948         * call.c (struct z_candidate): Add flags field.
949         (add_candidate): Add flags parm.
950         (add_function_candidate, add_conv_candidate, build_builtin_candidate)
951         (add_template_candidate_real): Pass it.
952         (build_over_call): Set CALL_EXPR_LIST_INIT_P.
953         * tree.c (build_aggr_init_expr): Copy it.
954         * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
956 2014-04-10  Richard Biener  <rguenther@suse.de>
957             Jakub Jelinek  <jakub@redhat.com>
959         PR ipa/60761
960         * error.c (dump_decl) <case FUNCTION_DECL>: If
961         DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
962         recurse on DECL_ABSTRACT_ORIGIN instead of printing
963         <built-in>.
965 2014-04-09  Fabien Chêne  <fabien@gcc.gnu.org>
967         * pt.c (check_template_variable): Check for the return of pedwarn
968         before emitting a note.
969         * parser.c (cp_parser_lambda_introducer): Likewise.
971 2014-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
973         PR c++/59115
974         * pt.c (process_template_parm): For an invalid non-type parameter
975         only set TREE_TYPE to error_mark_node.
976         (push_inline_template_parms_recursive, comp_template_parms,
977         redeclare_class_template, coerce_template_template_parm,
978         coerce_template_template_parms, unify): Use error_operand_p.
980 2014-04-08  Nathan Sidwell  <nathan@codesourcery.com>
982         * class.c (check_bases_and_members): Warn about non-virtual dtors
983         in public bases only.  Check warn_ecpp before complaining about
984         non-polymorphic bases.
986 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
988         * decl.c (duplicate_decls): Check for the return of warning_at
989         before emitting a note.
990         (warn_misplaced_attr_for_class_type): Likewise.
991         (check_tag_decl): Likewise.
993 2014-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
995         PR c++/58207
996         * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
998 2014-04-04  Patrick Palka  <patrick@parcs.ath.cx>
1000         PR c++/44613
1001         * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
1002         * decl.c (cp_finish_decl): Create a new BIND_EXPR before
1003         instantiating a variable-sized type.
1005         PR c++/21113
1006         * decl.c (decl_jump_unsafe): Consider variably-modified decls.
1008 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
1010         * class.c (find_abi_tags_r): Check for the return of warning
1011         before emitting a note.
1012         (one_inherited_ctor): Likewise.
1014 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
1016         * decl.c (duplicate_decls): Check for the return of permerror
1017         before emitting a note.
1019 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
1021         * class.c (accessible_nvdtor_p): New.
1022         (check_bases): Don't check base destructor here ...
1023         (check_bases_and_members): ... check them here.  Trigger on
1024         Wnon-virtual-dtor flag.
1025         (finish_struct_1): Use accessible_nvdtor_p.
1027 2014-04-01  Jason Merrill  <jason@redhat.com>
1029         * pt.c (process_partial_specialization): Say "not deducible"
1030         rather than "not used".  Use inform.
1032         PR c++/60374
1033         * pt.c (coerce_template_parms): Check that the pack expansion
1034         pattern works with the first matching parameter.
1036 2014-04-01  Fabien Chêne  <fabien@gcc.gnu.org>
1038         * init.c (perform_member_init): Homogenize uninitialized
1039         diagnostics.
1041 2014-04-01  Jason Merrill  <jason@redhat.com>
1043         PR c++/60708
1044         * call.c (build_array_conv): Call complete_type.
1046         PR c++/60713
1047         * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
1048         (picflag_from_initializer): Return it.
1049         (process_init_constructor): Handle it.
1051         PR c++/60642
1052         * decl2.c (is_late_template_attribute): Don't defer abi_tag.
1053         * mangle.c (write_unqualified_name): Fix abi_tag on templates.
1054         * pt.c (get_template_info): Handle NAMESPACE_DECL.
1055         (most_general_template): Handle more kinds of template.
1056         * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
1057         instantiations and specializations.
1059 2014-03-31  Patrick Palka  <patrick@parcs.ath.cx>
1061         PR c++/44859
1062         * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
1063         COMPONENT_REFs and ARRAY_REFs sooner.
1065 2014-03-29  Adam Butcher  <adam@jessamine.co.uk>
1067         PR c++/60626
1068         * parser.c (cp_parser_init_declarator): Handle erroneous generic type
1069         usage in non-functions with pushed scope.
1071 2014-03-28  Adam Butcher  <adam@jessamine.co.uk>
1073         PR c++/60573
1074         * name-lookup.h (cp_binding_level): New transient field defining_class_p
1075         to indicate whether a scope is in the process of defining a class.
1076         * semantics.c (begin_class_definition): Set defining_class_p.
1077         * name-lookup.c (leave_scope): Reset defining_class_p.
1078         * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
1079         defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
1080         unwinding to class-defining scope to handle the erroneous definition of
1081         a generic function of an arbitrarily nested class within an enclosing
1082         class.
1084 2014-03-26  Fabien Chêne  <fabien@gcc.gnu.org>
1086         PR c++/52369
1087         * method.c (walk_field_subobs): Improve the diagnostic
1088         locations for both REFERENCE_TYPEs and non-static const members.
1089         * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
1090         instead of %qD to be consistent with the c++11 diagnostic.
1092 2014-03-25  Jason Merrill  <jason@redhat.com>
1094         PR c++/60566
1095         PR c++/58678
1096         * class.c (build_vtbl_initializer): Handle abstract dtors here.
1097         * search.c (get_pure_virtuals): Not here.
1099         PR c++/60375
1100         * parser.c (cp_parser_lambda_expression): Don't parse the body of
1101         a lambda in unevaluated context.
1103         PR c++/60628
1104         * decl.c (create_array_type_for_decl): Complain about array of auto.
1106 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
1108         PR c++/60331
1109         * semantics.c (potential_constant_expression_1): Handle
1110         DECL_EXPR.
1112 2014-03-24  Adam Butcher  <adam@jessamine.co.uk>
1114         PR c++/60627
1115         * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
1116         introducing an implicit function template parameter within an explicit
1117         instantiation.
1119 2014-03-22  Jason Merrill  <jason@redhat.com>
1121         PR c++/60574
1122         * decl.c (grokdeclarator): Change permerror about 'virtual auto'
1123         to error.
1125 2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
1127         PR c++/60384
1128         * name-lookup.c (push_class_level_binding_1): Check identifier_p
1129         on the name argument.
1131 2014-03-20  Jakub Jelinek  <jakub@redhat.com>
1133         PR c++/60572
1134         * init.c (build_zero_init_1): Ignore fields with error_mark_node
1135         type.
1137 2014-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
1139         PR c++/51474
1140         * call.c (build_new_method_call_1): Handle pure virtuals called by
1141         NSDMIs too.
1143 2014-03-17  Adam Butcher  <adam@jessamine.co.uk>
1145         PR c++/60390
1146         * parser.c (cp_parser_member_declaration): Don't allow
1147         finish_fully_implicit_template to consider friend declarations to be
1148         class member templates.
1149         (synthesize_implicit_template_parm): Handling winding back through class
1150         scope to the class being defined in order to inject a template argument
1151         list.
1153         PR c++/60391
1154         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
1155         function scope as per cp_parser_skip_to_end_of_statement.
1157 2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
1159         PR c++/59571
1160         * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
1162 2014-03-14  Jason Merrill  <jason@redhat.com>
1164         PR c++/60532
1165         PR c++/58678
1166         * search.c (get_pure_virtuals): Handle abstract dtor here.
1167         (dfs_get_pure_virtuals): Not here.
1169         PR c++/58678
1170         * search.c (dfs_get_pure_virtuals): Treat the destructor of an
1171         abstract class as pure.
1173 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
1175         PR c++/60383
1176         * pt.c (maybe_process_partial_specialization): Check return value
1177         of check_specialization_namespace.
1179 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
1181         PR c++/60254
1182         * semantics.c (finish_static_assert): Call cxx_constant_value only
1183         if require_potential_rvalue_constant_expression returns true.
1185 2014-03-11  Paolo Carlini  <paolo.carlini@oracle.com>
1187         PR c++/60389
1188         * method.c (get_inherited_ctor): New.
1189         * cp-tree.h (get_inherited_ctor): Declare it.
1190         * semantics.c (is_valid_constexpr_fn): Use it.
1192 2014-03-10  Jason Merrill  <jason@redhat.com>
1194         PR c++/60367
1195         * call.c (convert_default_arg): Remove special handling for
1196         CONSTRUCTOR.
1198         PR c++/53492
1199         * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
1200         when deciding whether to call push_template_decl for a member class.
1201         * pt.c (push_template_decl_real): Return after wrong levels error.
1203 2014-03-08  Adam Butcher  <adam@jessamine.co.uk>
1205         PR c++/60033
1206         * pt.c (tsubst_copy): When retrieving a capture pack from a generic
1207         lambda, remove the lambda's own template argument list prior to fetching
1208         the specialization.
1210         PR c++/60393
1211         * parser.c (cp_parser_parameter_declaration_clause): Move generic
1212         function template unwinding on error into a more general location, ...
1213         (cp_parser_skip_to_end_of_statement): ... here.
1215 2014-03-07  Jason Merrill  <jason@redhat.com>
1217         * Make-lang.in (check_g++_parallelize): Split dg.exp.
1219         * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
1220         we're in a trailing return type.
1222         * typeck.c (comp_template_parms_position): 'auto' and
1223         'decltype(auto)' are different from real template parms.
1225         * parser.c (cp_parser_using_declaration): Consume the semicolon
1226         after bare parameter pack error.
1228         * cp-tree.h (REF_PARENTHESIZED_P): New.
1229         * semantics.c (force_paren_expr): Set it.
1230         * pt.c (do_auto_deduction): Check it.
1231         (tsubst) [COMPONENT_REF]: Copy it.
1232         * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
1234         * decl.c (create_array_type_for_decl): Only warn about invalid
1235         C++1y VLA if flag_iso or warn_vla>0.
1236         (grokdeclarator): Likewise.
1237         * pt.c (tsubst): Likewise.
1238         * semantics.c (finish_decltype_type): Likewise.
1239         * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
1240         (cp_build_addr_expr_1): Likewise.
1241         * init.c (build_new_1): Improve diagnostics.
1243 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
1245         PR c++/58609
1246         * decl.c (check_initializer): Return NULL_TREE after error;
1247         consistently use inform.
1249 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
1251         * decl.c (check_initializer): Remove dead code.
1253 2014-03-06  Marek Polacek  <polacek@redhat.com>
1255         PR c/60197
1256         * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
1257         of checking tree code.
1259 2014-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
1261         * parser.c (cp_lexer_set_source_position): New.
1262         (cp_parser_mem_initializer): Use it.
1263         (cp_parser_postfix_open_square_expression): Likewise.
1264         (cp_parser_parenthesized_expression_list): Likewise.
1265         (cp_parser_new_initializer): Likewise.
1266         (cp_parser_jump_statement): Likewise.
1267         (cp_parser_initializer): Likewise.
1268         (cp_parser_functional_cast): Likewise.
1270 2014-03-05  Jason Merrill  <jason@redhat.com>
1272         PR c++/60409
1273         * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
1274         dependent expression.
1276         PR c++/60361
1277         * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
1278         if re-parsing might succeed.
1279         * semantics.c (finish_id_expression): Use of a parameter outside
1280         the function body is a parse error.
1282         * parser.c (cp_parser_mem_initializer): Set input_location
1283         properly for init-list warning.
1284         (cp_parser_postfix_open_square_expression): Likewise.
1285         (cp_parser_parenthesized_expression_list): Likewise.
1286         (cp_parser_new_initializer): Likewise.
1287         (cp_parser_jump_statement): Likewise.
1288         (cp_parser_initializer): Likewise.
1289         (cp_parser_functional_cast): Likewise.
1291 2014-03-04  Jason Merrill  <jason@redhat.com>
1293         PR c++/60417
1294         * typeck2.c (process_init_constructor_record): Set
1295         CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
1297         PR c++/60415
1298         PR c++/54359
1299         * parser.c (cp_parser_direct_declarator): Set declarator to
1300         cp_error_declarator on invalid qualified-id.
1302 2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
1304         PR c++/60376
1305         * parser.c (cp_parser_using_declaration): Early return when
1306         cp_parser_nested_name_specifier errors out.
1308 2014-03-01  Adam Butcher  <adam@jessamine.co.uk>
1310         PR c++/60377
1311         * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
1312         function scope on parse error in function parameter list.
1314 2014-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
1316         * method.c (implicitly_declare_fn): Remove redundant
1317         DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
1318         * semantics.c (is_instantiation_of_constexpr): Likewise.
1319         * error.c (dump_function_decl): Likewise.
1321 2014-03-01  Jason Merrill  <jason@redhat.com>
1323         PR c++/60379
1324         * semantics.c (begin_maybe_infinite_loop): Use
1325         fold_non_dependent_expr_sfinae.
1327 2014-02-28  Jason Merrill  <jason@redhat.com>
1329         PR c++/58845
1330         * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
1332 2014-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
1334         PR c++/58610
1335         * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
1336         * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
1337         * lambda.c (maybe_add_lambda_conv_op): Likewise.
1339 2014-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
1341         PR c++/60253
1342         * call.c (convert_arg_to_ellipsis): Return error_mark_node after
1343         error_at.
1345 2014-02-27  Jason Merrill  <jason@redhat.com>
1347         PR c++/60353
1348         PR c++/55877
1349         * decl2.c (tentative_decl_linkage): Don't mess with functions that
1350         are not yet defined.
1352 2014-02-26  Jason Merrill  <jason@redhat.com>
1354         PR c++/60347
1355         PR lto/53808
1356         * class.c (clone_function_decl): Don't note_vague_linkage_fn.
1357         * init.c (build_vtbl_address): Do it here.
1359         PR c++/59231
1360         PR c++/11586
1361         PR c++/14710
1362         PR c++/57132
1363         * pt.c (struct warning_sentinel): New.
1364         (tsubst_copy_and_build): Use it instead of
1365         c_inhibit_evaluation_warnings.
1366         * typeck.c (maybe_warn_about_useless_cast): Remove
1367         c_inhibit_evaluation_warnings check.
1369         PR c++/54440
1370         * pt.c (get_template_parm_index): New.
1371         (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
1372         (process_template_parm): Allow bare packs in template template
1373         parm template parms.
1374         (coerce_template_parameter_pack): Handle fixed template template
1375         parm packs and fixed packs not at the end of the parm list.
1376         (coerce_template_parms): Handle template parm packs not at the end
1377         of the parm list.
1378         (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
1380         PR c++/60182
1381         * pt.c (unify): Ignore alias templates when deducing a template
1382         template parameter.
1384         PR c++/60345
1385         Revert:
1386         DR 1571
1387         * call.c (reference_binding): Recurse on user-defined conversion.
1388         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1390 2014-02-25  Jason Merrill  <jason@redhat.com>
1392         DR 1571
1393         * call.c (reference_binding): Recurse on user-defined conversion.
1394         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1396         * call.c (print_conversion_rejection): Handle n_arg of -2.
1397         (build_user_type_conversion_1): Pass it.
1399         PR c++/55877
1400         * decl2.c (no_linkage_error): Handle C++98 semantics.
1401         (reset_type_linkage): Move from decl.c.
1402         (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
1403         (bt_reset_linkage_2, reset_decl_linkage): New.
1404         (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
1405         (cp_write_global_declarations): Move condition into no_linkage_error.
1406         * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
1407         * semantics.c (expand_or_defer_fn_1): Factor out
1408         tentative_decl_linkage.
1409         * cp-tree.h: Adjust.
1411         * decl2.c (finish_static_data_member_decl): Diagnose static data
1412         member in unnamed class.
1413         * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
1415         PR lto/53808
1416         * class.c (clone_function_decl): Call note_vague_linkage_fn for
1417         defaulted virtual dtor.
1419         DR 1286
1420         PR c++/60328
1421         * pt.c (get_underlying_template): Fix equivalence calculation.
1423 2014-02-25  Adam Butcher  <adam@jessamine.co.uk>
1425         PR c++/60311
1426         * parser.c (function_being_declared_is_template_p): Return false when
1427         processing a template parameter list.
1428         (cp_parser_parameter_declaration_clause): Don't set
1429         auto_is_implicit_function_template_parm_p when processing a
1430         template parameter list.
1432         * parser.c (synthesize_implicit_template_parm): Inject new template
1433         argument list appropriately when a generic member function
1434         of a class template is declared out-of-line.
1436         PR c++/60065
1437         * parser.c (cp_parser_direct_declarator): Don't save and
1438         restore num_template_parameter_lists around call to
1439         cp_parser_parameter_declaration_list.
1440         (function_being_declared_is_template_p): New predicate.
1441         (cp_parser_parameter_declaration_list): Use
1442         function_being_declared_is_template_p as predicate for
1443         inspecting current function template parameter list length
1444         rather than num_template_parameter_lists.
1446 2014-02-24  Jason Merrill  <jason@redhat.com>
1448         PR c++/60146
1449         * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
1450         DECL_EXPR initialize a non-class iterator.
1452         PR c++/60312
1453         * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
1455 2014-02-21  Jason Merrill  <jason@redhat.com>
1457         PR c++/58170
1458         * parser.c (cp_parser_type_name): Always check dependency.
1459         (cp_parser_type_specifier_seq): Call
1460         cp_parser_parse_and_diagnose_invalid_type_name.
1462         PR c++/60108
1463         * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
1465         PR c++/60185
1466         * parser.c (cp_parser_default_argument): Clear
1467         current_class_ptr/current_class_ref like tsubst_default_argument.
1469         PR c++/60252
1470         * lambda.c (maybe_resolve_dummy): Check lambda_function rather
1471         than current_binding_level.
1473         PR c++/60186
1474         * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
1476         PR c++/60187
1477         * parser.c (cp_parser_enum_specifier): Call
1478         check_for_bare_parameter_packs.
1480         PR c++/59347
1481         * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
1482         erroneous typedef.
1484         PR c++/60241
1485         * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
1486         of the partial instantiation, not the most general template.
1487         (maybe_process_partial_specialization): Reassign everything on
1488         that list.
1490         PR c++/60216
1491         * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
1492         (check_explicit_specialization): Don't clone.
1494         PR c++/60219
1495         * pt.c (coerce_template_parms): Bail if argument packing fails.
1497         PR c++/60224
1498         * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
1499         Don't get confused by a CONSTRUCTOR that already has a type.
1501         PR c++/60227
1502         * call.c (build_array_conv): Don't crash on VLA.
1504         PR c++/60248
1505         * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
1507         PR c++/60252
1508         * lambda.c (maybe_resolve_dummy): Don't try to capture this
1509         in declaration context.
1511         DR 1591
1512         PR c++/60051
1513         * pt.c (unify): Only unify if deducible.  Handle 0-length list.
1515         PR c++/60250
1516         * parser.c (cp_parser_direct_declarator): Don't wrap a
1517         type-dependent expression in a NOP_EXPR.
1519         PR c++/60251
1520         * lambda.c (is_normal_capture_proxy): Handle VLA capture.
1522         PR c++/60167
1523         PR c++/60222
1524         PR c++/58606
1525         * parser.c (cp_parser_template_argument): Restore dereference.
1526         * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
1527         (process_partial_specialization): Handle deref.
1528         (unify): Likewise.
1530 2014-02-21  Adam Butcher  <adam@jessamine.co.uk>
1532         PR c++/60052
1533         PR c++/60053
1534         * parser.c (cp_parser_parameter_declaration_list): Correctly reset
1535         implicit_template_scope upon leaving an out-of-line generic member
1536         function definition.
1538 2014-02-20  Kai Tietz  <ktietz@redhat.com>
1540         PR c++/58873
1541         * parser.c (cp_parser_functional_cast): Treat NULL_TREE
1542         valued type argument as error_mark_node.
1544         PR c++/58835
1545         * semantics.c (finish_fname): Handle error_mark_node.
1547 2014-02-19  Jason Merrill  <jason@redhat.com>
1549         PR c++/60046
1550         * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
1551         spec from template context.
1553 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
1555         PR debug/56563
1556         * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
1557         FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
1559         PR c++/60267
1560         * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
1562 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
1564         PR c++/60225
1565         * semantics.c (ensure_literal_type_for_constexpr_object): Use
1566         strip_array_types.
1568 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
1570         PR c++/60215
1571         * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
1572         During error recovery allow_non_constant may be false.
1574 2014-02-18  Adam Butcher  <adam@jessamine.co.uk>
1576         PR c++/60190
1577         * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
1578         scope whenever a template parameter list has been started, independent
1579         of whether the function call operator was well-formed or not.
1581         PR c++/60064
1582         * parser.c (cp_parser_member_declaration): Pop fully implicit template
1583         scope for generic friend declarations as well as for non-friends.
1585 2014-02-12  Paolo Carlini  <paolo.carlini@oracle.com>
1587         PR c++/60047
1588         * method.c (implicitly_declare_fn): A constructor of a class with
1589         virtual base classes isn't constexpr (7.1.5p4).
1591 2014-02-05  Jan Hubicka  <hubicka@ucw.cz
1593         * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
1595 2014-02-05  Jakub Jelinek  <jakub@redhat.com>
1597         PR c++/58703
1598         * parser.c (cp_parser_omp_declare_reduction): Save and free
1599         declarator_obstack.
1601 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
1603         PR c++/53017
1604         PR c++/59211
1605         * tree.c (handle_init_priority_attribute): Call default_conversion on
1606         the attribute argument.
1608 2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
1610         PR c++/58871
1611         * method.c (synthesized_method_walk): If vbases is non-null but
1612         is_empty is true, likewise don't worry about the virtual bases.
1614 2014-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
1616         PR c++/51219
1617         * typeck2.c (process_init_constructor_record): Just skip unnamed
1618         bit-fields.
1620 2014-01-31  Jason Merrill  <jason@redhat.com>
1622         PR c++/59469
1623         * pt.c (mark_decl_instantiated): Call mark_needed.
1625         PR c++/58672
1626         * decl2.c (handle_tls_init): Handle null init fn.
1628         PR c++/55800
1629         * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
1631 2014-01-31  Paolo Carlini  <paolo.carlini@oracle.com>
1633         PR c++/59082
1634         * class.c (build_vfield_ref): Early return error_mark_node if
1635         TYPE_VFIELD (type) is null.
1636         (build_base_path): Check return value of build_vfield_ref.
1638 2014-01-31  Jason Merrill  <jason@redhat.com>
1640         PR c++/59646
1641         * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
1642         [ck_list]: Check for error_mark_node.
1643         (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
1645         PR c++/57043
1646         * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
1647         during partial ordering.
1649 2014-01-31  Marek Polacek  <polacek@redhat.com>
1651         PR c/59963
1652         * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
1654 2014-01-30  Jason Merrill  <jason@redhat.com>
1656         PR c++/57899
1657         * cp-tree.h (struct saved_scope): Add x_local_specializations.
1658         (local_specializations): New macro.
1659         * pt.c (local_specializations): Remove variable.
1661 2014-01-30  Richard Sandiford  <rdsandiford@googlemail.com>
1663         PR c++/58708
1664         * parser.c (make_string_pack): Use double_int::from_buffer.
1666 2014-01-30  Marek Polacek  <polacek@redhat.com>
1668         PR c/59940
1669         * typeck.c (build_ptrmemfunc1): Call convert_and_check with
1670         input_location.
1671         * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
1672         with input_location.
1673         * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
1674         loc parameter.
1676 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
1678         PR c++/58843
1679         * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
1681 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
1683         PR c++/58649
1684         * pt.c (lookup_template_class_1): Check start_enum return value
1685         for error_mark_node.
1687 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
1689         * decl.c (duplicate_decls, typename_hash, typename_compare):
1690         Use TYPE_IDENTIFIER.
1691         * error.c (dump_type): Likewise.
1692         * mangle.c (dump_substitution_candidates): Likewise.
1694 2014-01-30  Jason Merrill  <jason@redhat.com>
1696         PR c++/59633
1697         * decl2.c (attributes_naming_typedef_ok): New.
1698         * cp-tree.h: Declare it.
1699         * decl.c (grokdeclarator): Check it.
1700         * tree.c (no_linkage_check): Handle VECTOR_TYPE.
1702 2014-01-29  Jason Merrill  <jason@redhat.com>
1704         PR c++/59707
1705         * call.c (add_builtin_candidate): Catch dependent types.
1707         PR c++/59989
1708         * pt.c (expand_template_argument_pack): Correct
1709         non_default_args_count calculation.
1711         PR c++/58466
1712         * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
1714         PR c++/59956
1715         * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
1716         have a friend template in a class template.
1717         * pt.c (tsubst_friend_function): Look through it.
1718         (push_template_decl_real): A friend member template is
1719         primary.
1721 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1723         PR c++/58846
1724         * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
1725         == error_mark_node.
1727 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1729         PR c++/58674
1730         * pt.c (instantiate_template_1): Check for error_mark_node the second
1731         argument too.
1733 2014-01-29  Jason Merrill  <jason@redhat.com>
1735         PR c++/59916
1736         * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
1737         cdtor_returns_this case.
1739         PR c++/59315
1740         * decl.c (cxx_maybe_build_cleanup): Call mark_used.
1742 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1744         PR c++/58702
1745         * semantics.c (finish_omp_reduction_clause): Check type for
1746         error_mark_node.
1748 2014-01-28  Jason Merrill  <jason@redhat.com>
1750         PR c++/59791
1751         * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
1752         (tsubst_copy): Use it if lookup fails.
1754         PR c++/59818
1755         * pt.c (tsubst_function_type): Make sure we keep the same function
1756         quals.
1758         PR c++/58701
1759         * semantics.c (build_anon_member_initialization): Stop walking
1760         when we run out of COMPONENT_REFs.
1762         PR c++/58632
1763         * decl.c (lookup_and_check_tag): Ignore template parameters if
1764         scope == ts_current.
1765         * pt.c (check_template_shadow): Don't complain about the injected
1766         class name.
1768         * decl.c (duplicate_decls): Tweak.
1770         PR c++/53756
1771         * mangle.c (write_unqualified_name): Handle operator auto.
1773 2014-01-27  Jason Merrill  <jason@redhat.com>
1775         PR c++/59823
1776         Core DR 1138
1777         * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
1778         list-initialization.  A conversion to rvalue ref that involves
1779         an lvalue-rvalue conversion is bad.
1780         (convert_like_real): Give helpful error message.
1782         PR c++/54652
1783         * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
1785         PR c++/58504
1786         * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
1787         types.
1789         PR c++/58606
1790         * pt.c (template_parm_to_arg): Call convert_from_reference.
1791         (tsubst_template_arg): Don't strip reference refs.
1793         PR c++/58639
1794         * call.c (build_aggr_conv): Reject value-initialization of reference.
1796         PR c++/58812
1797         PR c++/58651
1798         * call.c (convert_like_real): Give helpful error about excess braces
1799         for ck_rvalue of scalar type.
1801         Core DR 1288
1802         * call.c (reference_binding): Only elide braces if the single
1803         element is reference-related.
1805         PR c++/58814
1806         * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
1807         stabilizing.
1809         PR c++/58837
1810         * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
1811         FUNCTION_DECL.
1813         PR c++/59097
1814         * decl.c (compute_array_index_type): Don't call
1815         maybe_constant_value for a non-integral expression.
1817 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1819         * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
1820         flag_cilkplus.
1821         * cp-gimplify.c (cp_genericize): Likewise.
1822         * decl.c (grokfndecl): Likewise.
1823         * parser.c (cp_parser_postfix_expression): Likewise.
1824         (cp_parser_postfix_open_square_expression): Likewise.
1825         (cp_parser_direct_declarator): Likewise.
1826         (is_cilkplus_vector_p): Likewise.
1827         (cp_parser_omp_clause_name): Likewise.
1828         (cp_parser_omp_all_clauses): Likewise.
1829         * pt.c (apply_late_template_attributes): Likewise.
1830         * typeck.c (cp_build_array_ref): Likewise.
1831         (cp_build_compound_expr): Likewise.
1832         (check_return_expr): Likewise.
1834 2014-01-24  Jason Merrill  <jason@redhat.com>
1836         PR c++/58550
1837         * decl.c (grokdeclarator): Turn pedwarn about auto return type in
1838         c++11 into error.
1840         PR c++/59886
1841         PR c++/59659
1842         * typeck2.c (process_init_constructor_array): Don't create
1843         RANGE_EXPR yet.
1845 2014-01-24  Jakub Jelinek  <jakub@redhat.com>
1847         * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
1848         handling for RANGE_ARRAY case.
1850 2014-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
1852         PR c++/57524
1853         * name-lookup.c (push_using_directive): Use timevar_cond_start.
1855 2014-01-23  Marek Polacek  <polacek@redhat.com>
1857         PR c/59846
1858         * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
1860 2014-01-23  Marek Polacek  <polacek@redhat.com>
1862         PR c/58346
1863         * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1864         an empty aggregate.
1866 2014-01-23  Jason Merrill  <jason@redhat.com>
1868         PR c++/55189
1869         * cp-tree.h (struct language_function): Add infinite_loop and
1870         infinite_loops.
1871         (current_function_infinite_loop): New.
1872         * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
1873         (break_maybe_infinite_loop): New.
1874         (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
1875         (finish_do_stmt, finish_for_cond, finish_for_stmt)
1876         (begin_range_for_stmt): Use them.
1877         * decl.c (finish_function): Don't warn about missing return
1878         if current_function_infinite_loop.
1879         * pt.c (instantiate_decl): Copy current_function_infinite_loop.
1880         * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
1882         * call.c (build_op_delete_call): Use make_tree_vector and
1883         release_tree_vector.
1885 2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
1887         PR c++/58980
1888         * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
1889         nested_name_specifier.
1891 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1893         * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
1894         see if there is an attribute after function decl.  If so, then
1895         parse them now.
1896         (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
1897         enabled function late parsing.
1898         (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
1899         attribute for a SIMD-enabled function.
1900         (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
1901         the function is used by SIMD-enabled function (indicated by NULL
1902         pragma token).   Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
1903         PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
1904         (cp_parser_cilk_simd_vectorlength): Modified this function to handle
1905         vectorlength clause in SIMD-enabled function and #pragma SIMD's
1906         vectorlength clause.  Added a new bool parameter to differentiate
1907         between the two.
1908         (cp_parser_cilk_simd_fn_vector_attrs): New function.
1909         (is_cilkplus_vector_p): Likewise.
1910         (cp_parser_late_parsing_elem_fn_info): Likewise.
1911         (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
1912         and "vectorlength" clauses when Cilk Plus is enabled.
1913         (cp_parser_omp_clause_linear): Added a new parameter of type bool
1914         and emit a sorry message when step size is a parameter.
1915         * parser.h (cp_parser::cilk_simd_fn_info): New field.
1916         * decl.c (grokfndecl): Added flag_enable_cilkplus along with
1917         flag_openmp.
1918         * pt.c (apply_late_template_attributes): Likewise.
1920 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
1922         PR middle-end/58809
1923         * semantics.c (finish_omp_reduction_clause): Reject
1924         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1926 2014-01-22  Ville Voutilainen  <ville.voutilainen@gmail.com>
1928         PR c++/59482
1929         * parser.c (cp_parser_class_head): Push the class before parsing
1930         the base-clause, pop after it.
1932 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
1934         * decl2.c (cpp_check): Revert prototype change.
1936 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
1938         PR c++/59270
1939         PR c++/58811
1940         * init.c (build_value_init_noctor): Don't pass error_mark_node to
1941         build_value_init.
1943 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
1945         PR c++/59269
1946         * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
1947         only when errorcount == 0.
1949 2014-01-17  Marek Polacek  <polacek@redhat.com>
1951         PR c++/59838
1952         * cvt.c (ocp_convert): Don't segfault on non-existing
1953         ENUM_UNDERLYING_TYPE.
1955 2014-01-16  Jason Merrill  <jason@redhat.com>
1957         PR c++/59821
1958         * tree.c (bot_manip): Update the location of builtin_LINE and
1959         builtin_FILE calls.
1961 2014-01-14  Jason Merrill  <jason@redhat.com>
1963         PR c++/59659
1964         * typeck2.c (massage_init_elt): New.
1965         (process_init_constructor_record)
1966         (process_init_constructor_union): Use it.
1967         (process_init_constructor_array): Use it.  Use RANGE_EXPR.
1968         (split_nonconstant_init_1): Handle it.
1969         * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
1971 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1973         PR c++/59631
1974         * parser.c (cp_parser_postfix_expression): Added a new if-statement
1975         and replaced an existing if-statement with else-if statement.
1976         Changed an existing error message wording to match the one from the C
1977         parser.
1979 2014-01-08  Jason Merrill  <jason@redhat.com>
1981         PR c++/59614
1982         * class.c (abi_tag_data): Add tags field.
1983         (check_abi_tags): Initialize it.
1984         (find_abi_tags_r): Support collecting missing tags.
1985         (mark_type_abi_tags): Don't look at template args.
1986         (inherit_targ_abi_tags): New.
1987         (check_bases_and_members): Use it.
1988         * cp-tree.h (ABI_TAG_IMPLICIT): New.
1989         * mangle.c (write_abi_tags): Check it.
1991 2014-01-07  Jason Merrill  <jason@redhat.com>
1993         PR c++/58856
1994         * pt.c (num_innermost_template_parms): New.
1995         (get_underlying_template): Use it.
1997         PR c++/58965
1998         * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
2000 2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
2002         * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
2003         the letter of 20.11.6 about Base and Derived naming the same
2004         class type modulo cv-qualifiers.
2006 2014-01-06  Adam Butcher  <adam@jessamine.co.uk>
2008         PR c++/59635
2009         * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
2010         function as unimplemented for generic lambdas with varargs.
2012         PR c++/59636
2013         * parser.c (cp_parser_template_parameter): Early out with
2014         error_mark_node if parameter declaration was not parsed.
2016         PR c++/59629
2017         * parser.c (cp_parser_lambda_expression): Save/reset/restore
2018         auto_is_implicit_function_template_parm_p around lambda body.
2020         PR c++/59638
2021         * parser.c (cp_parser_init_declarator): Undo fully implicit
2022         template parameter list when declarator is not a function.
2024 2014-01-03  Marc Glisse  <marc.glisse@inria.fr>
2026         PR c++/58950
2027         * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
2029 2014-01-03  Tobias Burnus  <burnus@net-b.de>
2031         PR c++/58567
2032         * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
2034 2014-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2036         Core DR 1442
2037         PR c++/59165
2038         * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
2039         as include_std to perform_koenig_lookup.
2040         (cp_parser_postfix_expression): Adjust.
2041         * pt.c (tsubst_copy_and_build): Likewise.
2042         * semantics.c (perform_koenig_lookup): Remove bool parameter.
2043         (omp_reduction_lookup): Adjust.
2044         * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
2045         (lookup_arg_dependent): Likewise.
2046         (lookup_function_nonclass): Adjust.
2047         * name-lookup.h: Adjust declaration.
2048         * cp-tree.h: Likewise.
2050 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
2052         PR c++/59087
2053         * parser.c (cp_parser_userdef_numeric_literal): Mention
2054         -fext-numeric-literals in the message.
2056 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
2058         PR c++/59641
2059         * call.c (build_conditional_expr_1): Check the return value of
2060         force_rvalue.
2062 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
2064         * call.c (convert_like_real): Check complain.
2066 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
2068         PR c++/59378
2069         * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
2070         in templates.
2072 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2074         Update copyright years
2076 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2078         * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
2079         the standard form for the copyright notice.
2081 Copyright (C) 2014 Free Software Foundation, Inc.
2083 Copying and distribution of this file, with or without modification,
2084 are permitted in any medium without royalty provided the copyright
2085 notice and this notice are preserved.