Introduce gimple_phi and use it in various places
[official-gcc.git] / gcc / cp / ChangeLog
blobc94916c89f5ae337b6116edf412b644cbf7f552e
1 2014-10-13  H.J. Lu  <hongjiu.lu@intel.com>
3         * mangle.c (mangle_conv_op_name_for_type): Cast elements to
4         unsigned long.
5         (print_template_statistics): Cast size and elements to long.
7 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
9         * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
10         pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
11         hashtab.
13 2014-10-10  Jason Merrill  <jason@redhat.com>
15         PR c++/62115
16         * class.c (build_base_path): Preserve rvalueness.
17         * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
18         * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
20         PR c++/63194
21         * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
23         * method.c (implicitly_declare_fn): Handle deleted lambda default
24         ctor and copy assop here.
25         * class.c (check_bases_and_members): Not here.
26         (add_implicitly_declared_members): And don't set
27         CLASSTYPE_LAZY_MOVE_ASSIGN.
29         * semantics.c (finish_id_expression): Check for error_mark_node.
31 2014-10-09  Jason Merrill  <jason@redhat.com>
33         PR c++/63207
34         * semantics.c (outer_var_p): Non-static.
35         (process_outer_var_ref): Split out from finish_id_expression.
36         * pt.c (tsubst_copy_and_build): Call them.
37         * cp-tree.h: Declare them.
39 2014-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
41         * semantics.c (check_constexpr_ctor_body_1): New.
42         (check_constexpr_ctor_body): Use it; add bool parameter.
43         (build_data_member_initialization): Handle BIND_EXPR and
44         USING_STMT in the main conditional.
45         (build_constexpr_constructor_member_initializers): Do not
46         handle BIND_EXPR here.
47         (constexpr_fn_retval): Handle BIND_EXPR in the switch.
48         (massage_constexpr_body): Don't do it here.
49         * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
50         Adjust check_constexpr_ctor_body call.
51         (cp_parser_compound_statement): Do not pedwarn for compound-statement
52         in constexpr function in C++14 mode.
53         * cp-tree.h (check_constexpr_ctor_body): Update declaration.
55 2014-10-09  Jason Merrill  <jason@redhat.com>
57         PR c++/63309
58         * parser.c (cp_parser_class_head): push_template_decl for members
59         of templates, too.
61         PR c++/63415
62         * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
63         (iterative_hash_template_arg): Likewise.
65         PR c++/63437
66         * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
67         * semantics.c (force_paren_expr): And set it.
68         * typeck.c (check_return_expr): And handle it.
70 2014-10-09  Marc Glisse  <marc.glisse@inria.fr>
72         * decl.c (grokdeclarator): constexpr only implies const in C++11.
74 2014-10-08  Jason Merrill  <jason@redhat.com>
76         PR c++/63405
77         * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
79         PR c++/63485
80         * tree.c (build_cplus_array_type): Look for a type with no
81         typedef-name or attributes.
83         * call.c (call_copy_ctor): New.
84         (build_over_call): Use it to avoid infinite recursion on invalid code.
86 2014-10-07  Jason Merrill  <jason@redhat.com>
88         * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
90 2014-10-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
92         * cp/parser.c: Allow [[deprecated]] for C++11.  Issue a pedwarn.
94 2014-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
96         PR c++/55250
97         * semantics.c (check_constexpr_bind_expr_vars): New.
98         (check_constexpr_ctor_body, massage_constexpr_body): Use it.
99         (build_constexpr_constructor_member_initializers): Handle
100         BIND_EXPR in the main conditional.
102 2014-10-02  Mark Wielaard  <mjw@redhat.com>
104         PR debug/63239
105         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
106         (cp_function_decl_deleted_p): New prototype.
107         * cp-objcp-common.c (cp_function_deleted_p): New function.
109 2014-10-03  Marc Glisse  <marc.glisse@inria.fr>
111         PR c++/54427
112         PR c++/57198
113         PR c++/58845
114         * typeck.c (cp_build_binary_op): save_expr after convert to save
115         redundant operations.
116         [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
117         (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
119 2014-10-03  Jason Merrill  <jason@redhat.com>
121         * decl.c (start_decl): Complain about static/thread_local vars
122         in constexpr function.
123         (check_for_uninitialized_const_var): Also uninitialized vars.
124         * parser.c (cp_parser_jump_statement): And gotos.
125         (cp_parser_asm_operand_list): And asm.
126         (cp_parser_try_block): And try.
127         * semantics.c (ensure_literal_type_for_constexpr_object): And
128         non-literal.
130         * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
131         (var_in_constexpr_fn): New.
132         (cxx_eval_constant_expression): Look into DECL_INITIAL.
133         (potential_constant_expression_1): Allow constexpr-local vars.
135         PR c++/63362
136         * tree.c (strip_typedefs): Handle TREE_LIST.
138 2014-10-03  Paolo Carlini  <paolo.carlini@oracle.com>
140         * parser.c (cp_parser_assignment_expression,
141         cp_parser_constant_expression): Add default arguments.
142         (cp_parser_primary_expression,
143         cp_parser_postfix_open_square_expression,
144         cp_parser_parenthesized_expression_list,
145         cp_parser_question_colon_clause,
146         cp_parser_expression, cp_parser_constant_expression,
147         cp_parser_label_for_labeled_statement, cp_parser_static_assert,
148         cp_parser_template_argument, cp_parser_enumerator_definition,
149         cp_parser_member_declaration, cp_parser_constant_initializer,
150         cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
151         cp_parser_std_attribute_spec, cp_parser_objc_message_args,
152         cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
153         cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
154         cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
155         cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
156         cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
158 2014-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
160         PR c++/53025
161         * cp-tree.h (struct saved_scope): Add noexcept_operand.
162         (cp_noexcept_operand): Define.
163         * call.c (build_over_call): Use it.
164         * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
165         * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
167 2014-10-01  Jason Merrill  <jason@redhat.com>
169         PR c++/63362
170         * method.c (constructible_expr): Handle value-init of non-class.
171         * parser.c (cp_parser_trait_expr): Allow pack expansion.
172         * pt.c (tsubst_copy_and_build): Handle pack expansion.
174         PR c++/63362
175         * class.c (type_has_non_user_provided_default_constructor): Rename
176         from type_has_user_provided_default_constructor, reverse sense.
177         (default_init_uninitialized_part, explain_non_literal_class): Adjust.
178         (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
179         * call.c (build_new_method_call_1): Adjust.
180         * cp-tree.h: Adjust.
181         * decl.c (grok_special_member_properties): Don't set
182         TYPE_HAS_COMPLEX_DFLT.
183         * init.c (build_value_init_noctor): Don't use
184         type_has_user_provided_default_constructor.
186 2014-09-30  Jason Merrill  <jason@redhat.com>
188         * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
189         CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
190         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
191         * parser.c (cp_parser_primary_expression): Likewise.
192         (cp_parser_trait_expr): Likewise.  Handle variadic trait.
193         * semantics.c (trait_expr_value): Likewise.
194         (finish_trait_expr): Likewise.
195         (check_trait_type): Handle variadic trait.  Return bool.
196         * method.c (build_stub_object): Add rvalue reference here.
197         (locate_fn_flags): Not here.
198         (check_nontriv, assignable_expr, constructible_expr): New.
199         (is_trivially_xible): New.
201         * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
202         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
203         * parser.c (cp_parser_primary_expression): Likewise.
204         (cp_parser_trait_expr): Likewise.
205         * semantics.c (trait_expr_value): Likewise.
206         (finish_trait_expr): Likewise.
208         * method.c (build_stub_object): Use CONVERT_EXPR.
209         * tree.c (build_dummy_object): Likewise.
210         (is_dummy_object): Adjust.
212         * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
213         * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
214         * semantics.c (trait_expr_value): Likewise.
215         (finish_trait_expr): Likewise.
216         * parser.c (cp_parser_primary_expression): Likewise.
217         (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
219 2014-09-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
221        PR c++/16564
222        * error.c (print_instantiation_context): Delete.
223        * typeck2.c (build_x_arrow): Record location when pushing
224        template instantiation.
225        * pt.c (push_tinst_level): Make it a wrapper around ...
226        (push_tinst_level_loc): ... this. New function. Make excessive
227        template instantiation depth a fatal error. Record location. Use
228        bool as return type.
229        (instantiate_pending_templates): Make excessive
230        template instantiation depth a fatal error.
231        (problematic_instantiation_changed): Use bool as return type.
232        * cp-tree.h (print_instantiation_context): Delete.
233        (push_tinst_level): Update declaration.
234        (problematic_instantiation_changed): Likewise.
235        (push_tinst_level_loc): New.
237 2014-09-29  Richard Biener  <rguenther@suse.de>
239         * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
240         for conversions.
242 2014-09-26  Jason Merrill  <jason@redhat.com>
244         * mangle.c (find_substitution): Use write_abi_tags.
246 2014-09-25  Marek Polacek  <polacek@redhat.com>
248         PR c++/61945
249         * class.c (warn_hidden): Check for FUNCTION_DECL.
251 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
253         PR c++/63249
254         * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
255         on low_bound and length.
257 2014-09-24  Aldy Hernandez  <aldyh@redhat.com>
259         * class.c, decl.c, optimize.c: Rename all instances of
260         DECL_ABSTRACT to DECL_ABSTRACT_P.
262 2014-09-24  Marek Polacek  <polacek@redhat.com>
264         PR c/61405
265         PR c/53874
266         * semantics.c (finish_switch_cond): Call unlowered_expr_type.
267         * tree.c (bot_manip): Add default case.
268         * parser.c (cp_parser_primary_expression): Cast the controlling
269         expression of a switch to an int.
270         (cp_parser_unqualified_id): Likewise.
272 2014-09-23  Paolo Carlini  <paolo.carlini@oracle.com>
274         PR c++/61857
275         * parser.c (cp_parser_skip_to_closing_square_bracket,
276         cp_parser_array_designator_p): New.
277         (cp_parser_initializer_list): Use the latter.
279 2014-09-22  Jason Merrill  <jason@redhat.com>
281         * semantics.c (finish_non_static_data_member): In diagnostic, give
282         error at point of use and note at point of declaration.
284         PR c++/63320
285         PR c++/60463
286         PR c++/60755
287         * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
288         not finding 'this'.
290 2014-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
292         PR c++/62219
293         * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
295 2014-09-22  Jason Merrill  <jason@redhat.com>
297         * decl.c (poplevel): Don't warn about unused vars in template scope.
298         * error.c (dump_decl): Handle variable templates.
300 2014-09-20  Jason Merrill  <jason@redhat.com>
302         PR c++/62017
303         * decl.c (begin_destructor_body): Only clobber the as-base part of
304         *this.
306 2014-09-19  Jason Merrill  <jason@redhat.com>
308         PR c++/61392
309         * mangle.c (write_expression): Use unresolved-name mangling for
310         DR850 case.
312         PR c++/61465
313         * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
314         after pulling out an element from a CONSTRUCTOR.
316 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
318         PR c++/63248
319         * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
320         on type of type dependent expressions, and don't call it if
321         handle_omp_array_sections has kept TREE_LIST because something
322         was type dependent.
323         * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
324         Use keep_next_level, begin_omp_structured_block and
325         finish_omp_structured_block instead of push_stmt_list and
326         pop_stmt_list.
328 2014-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
330         PR c++/62232
331         * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
332         for final class types.
334 2014-09-15  Jason Merrill  <jason@redhat.com>
336         * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
337         necessary.  Call inherit_targ_abi_tags here.
338         * class.c (check_bases_and_members): Not here.
339         (inherit_targ_abi_tags): Check CLASS_TYPE_P.
340         * cp-tree.h: Declare inherit_targ_abi_tags.
342 2014-09-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
344         Do not diagnose lambda default arguments in c++14 modes.
345         * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
346         conditional.
348 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
350         * Make-lang.in (check_g++_parallelize): Change to just an upper bound
351         number.
353 2014-09-13  Marek Polacek  <polacek@redhat.com>
355         PR c++/60862
356         * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
357         location of a call expression.
359 2014-09-11  Jason Merrill  <jason@redhat.com>
361         PR c++/63201
362         * decl.c (start_decl): Handle specialization of member variable
363         template.
364         * pt.c (check_explicit_specialization): Adjust error.
366 2014-09-11  Paolo Carlini  <paolo.carlini@oracle.com>
368         PR c++/61489
369         * typeck2.c (process_init_constructor_record): Do not warn about
370         missing field initializer if EMPTY_CONSTRUCTOR_P (init).
372 2014-09-11  Jason Merrill  <jason@redhat.com>
374         PR c++/63139
375         * pt.c (tsubst_pack_expansion): Simplify substitution into T....
376         (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
378 2014-09-10  Jason Merrill  <jason@redhat.com>
380         PR c++/61659
381         * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
382         (duplicate_decls, start_decl): Likewise.
383         * pt.c (check_explicit_specialization): Likewise.
384         (push_template_decl_real): Or static templates.
386 2014-09-08  Jason Merrill  <jason@redhat.com>
388         * typeck.c (build_class_member_access_expr): Move
389         -Winvalid-offsetof code...
390         * semantics.c (finish_offsetof): ...here.
391         * parser.c (cp_parser_builtin_offsetof): Remember the location of
392         the type argument.
393         * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
395         PR c++/62255
396         * pt.c (instantiate_decl): Handle recursive instantiation of
397         static data member.
399 2014-09-05  Jason Merrill  <jason@redhat.com>
401         PR c++/62659
402         * semantics.c (potential_constant_expression_1): Handle un-folded
403         pointer to member constants.
405 2014-09-04  Markus Trippelsdorf  <markus@trippelsdorf.de>
407         PR ipa/61659
408         * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
409         newdecl, not olddecl.
411 2014-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
413         DR 1453
414         * class.c (check_field_decls): A class of literal type cannot have
415         volatile non-static data members and base classes.
416         (explain_non_literal_class): Update.
418 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
419             Balaji V. Iyer  <balaji.v.iyer@intel.com>
420             Igor Zamyatin  <igor.zamyatin@intel.com>
422         * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
423         simplified.
424         * parser.c (cp_parser_cilk_for): New function.
425         (cp_parser_cilk_grainsize): Likewise.
426         (cp_parser_statement): Added RID_CILK_FOR case.
427         (cp_parser_omp_for_cond): Added CILK_FOR check.
428         (cp_parser_omp_for_loop_init): Change function argument to accept
429         tree_code instead just a bool flag; change the check to use that
430         tree_code; check for initialization declaration in case of Cilk_for.
431         (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
432         changed call to cp_parser_omp_for_loop_init according new arguments'
433         list.
434         (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
435         * pt.c (tsubst_expr): Added CILK_FOR case.
436         * semantics.c: Include convert.h.
437         (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
438         case; added OMP_CLAUSE__CILK_FOR_COUNT_.
439         (handle_omp_for_class_iterator): New argument lastp and its usage;
440         added NE_EXPR case.
441         (finish_omp_for): Changed call to handle_omp_for_class_iterator
442         according new arguments' list; in case of Cilk_for save very first
443         decl and create empty stmt_list block; use block to build correct
444         statement tree.
446 2014-08-31  Jason Merrill  <jason@redhat.com>
448         PR c++/62302
449         * optimize.c (cdtor_comdat_group): Just look at the
450         DECL_ASSEMBLER_NAME of the 'tors.
452 2014-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
454         PR c++/52892
455         * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
456         result of cxx_eval_constant_expression.
458 2014-08-26  Jason Merrill  <jason@redhat.com>
460         PR c++/58624
461         * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
462         (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
463         * semantics.c (finish_id_expression): Don't call TLS wrapper in a
464         template.
466 2014-08-25  Jason Merrill  <jason@redhat.com>
468         * pt.c (check_explicit_specialization): Don't complain about
469         non-template variable.
470         (template_for_substitution): Allow variable templates.
471         (check_template_variable): Fix logic for member var template.
472         * decl.c (start_decl): Don't complain about extra template header
473         here.
475         * decl.c (start_decl): Look through member variable template.
476         * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
477         * decl2.c (grokfield): Set DECL_CONTEXT earlier on
478         variables.
480 2014-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
482         PR c++/34938
483         * cp-tree.h (TFF_POINTER): Add.
484         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
485         argument too.
486         * error.c (dump_type_suffix): Actually print the const and noreturn
487         attribute when appropriate.
489 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
491         * decl.c (compute_array_index_type, grokdeclarator,
492         undeduced_auto_decl): Change from cxx1y to cxx14.
493         *lambda.c(add_capture()): Change error message from C++1y to C++14.
494         * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
495         cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
496         cp_parser_decltype, cp_parser_conversion_type_id,
497         cp_parser_simple_type_specifier, cp_parser_type_id_1,
498         cp_parser_template_type_arg, cp_parser_std_attribute,
499         cp_parser_template_declaration_after_export): Ditto.
500         * pt.c (tsubst): Ditto.
501         * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
502         * tree.c: Change comment.
503         * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
504         cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
506 2014-08-23  Jason Merrill  <jason@redhat.com>
508         Allow non-constexpr variable templates.
509         * decl2.c (note_variable_template_instantiation): New.
510         * cp-tree.h: Declare it.
511         * pt.c (instantiate_decl): Call it.
512         (push_template_decl_real): Allow non-constexpr variable templates.
513         * semantics.c (finish_id_expression): Mark the variable template
514         instantiation as used.
515         * mangle.c (write_mangled_name): Variable template instantiations
516         are mangled.
517         * parser.c (cp_parser_init_declarator): Complain about
518         non-function implicit templates.
520 2014-08-22  Marek Polacek  <polacek@redhat.com>
522         PR c++/62199
523         * parser.c (cp_parser_binary_expression): Check each LHS if it's
524         preceded with logical not.  Adjust call to
525         warn_logical_not_parentheses.
527 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
529         PR c++/57709
530         * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
531         declaration shadows a function declaration, unless the former
532         declares a function, pointer to function or pointer to member
533         function, because this is a common and valid case in real-world
534         code.
535         * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
536         Improve description.
538 2014-08-22  Jason Merrill  <jason@redhat.com>
540         PR c++/62129
541         * class.c (outermost_open_class): Fix logic.
542         * decl.c (complete_vars): Fix logic.
544 2014-08-22  Jason Merrill  <jason@redhat.com>
546         PR c++/62129
547         * class.c (outermost_open_class): New.
548         * cp-tree.h: Declare it.
549         * decl.c (maybe_register_incomplete_var): Use it.
550         (complete_vars): Handle any constant variable.
551         * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
553 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
555         PR other/62008
556         * cp-array-notation.c (build_array_notation_ref): Added correct
557         handling of case with incorrect array.
559 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
561         PR fortran/44054
562         * error.c (cp_diagnostic_finalizer): Delete.
563         (init_error): Do not set diagnostic_finalizer here.
565 2014-08-19  Marek Polacek  <polacek@redhat.com>
567         PR c++/62153
568         * call.c (build_new_op_1): Remember the type of arguments for
569         a comparison.  If either operand of a comparison is a boolean
570         expression, call maybe_warn_bool_compare.
572 2014-08-19  Jason Merrill  <jason@redhat.com>
574         PR tree-optimization/62091
575         * decl2.c (decl_needed_p): Return true for virtual functions when
576         devirtualizing.
578         PR lto/53808
579         PR c++/61659
580         * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
581         comdat_linkage.
583 2014-08-19  Gerald Pfeifer  <gerald@pfeifer.com>
585         * class.c (contains_empty_class_p): Remove.
587 2014-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
589         * parser.c (cp_parser_expression): Add default arguments.
590         (cp_parser_primary_expression, cp_parser_postfix_expression,
591         cp_parser_array_notation, cp_parser_postfix_open_square_expression,
592         cp_parser_unary_expression, cp_parser_direct_new_declarator,
593         cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
594         cp_parser_lambda_body, cp_parser_expression_statement,
595         cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
596         cp_parser_iteration_statement, cp_parser_jump_statement,
597         cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
598         cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
599         cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
600         cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
601         cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
602         cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
603         cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
604         cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
605         cp_parser_transaction_expression): Adjust.
607 2014-08-15  Jason Merrill  <jason@redhat.com>
609         PR c++/61566
610         * pt.c (lookup_template_class_1): Revert recent change.
611         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
613         PR c++/61566
614         * pt.c (instantiate_class_template_1): Ignore lambda on
615         CLASSTYPE_DECL_LIST.
616         (push_template_decl_real): A lambda is not primary.
617         (lookup_template_class_1): Don't look for a lambda partial
618         instantiation.
619         * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
620         currently in a function and the lambda living in a function.
621         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
623 2014-08-15  Richard Biener  <rguenther@suse.de>
624             Jason Merrill  <jason@redhat.com>
626         PR bootstrap/62077
627         * tree.c (build_min_array_type, set_array_type_canon): Split out...
628         (build_cplus_array_type): ...from here.  Only call build_array_type
629         for main variants.
631 2014-08-15  Paolo Carlini  <paolo.carlini@oracle.com>
633         PR c++/62072
634         Revert:
635         2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
637         DR 1584
638         PR c++/57466
639         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
640         cv-qualifiers of function types.
642 2014-08-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
644         * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
646 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
648         * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
649         cp_build_array_ref, cp_build_function_call_vec): When a
650         pedwarn is suppressed under SFINAE, return error_mark_node.
652         * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
653         tf_warning_or_error, where complain is a bool, glitch.
655 2014-08-14  Ville Voutilainen  <ville.voutilainen@gmail.com>
657         PR c++/62101
658         * decl.c (grokdeclarator): Move the check for friend initializers..
659         * decl2.c (grokfield) ..here. Postpone early return for friends
660         until after the initializer check.
662 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
664         PR c++/54377
665         * pt.c (coerce_template_parms): Improve error message vs default
666         arguments.
668 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
670         * parser.c (cp_parser_init_declarator): Remove redundant check of
671         decl_specifiers->type.
673 2014-08-13  Jason Merrill  <jason@redhat.com>
675         * call.c (build_x_va_arg): Support passing non-POD through ....
676         (convert_arg_to_ellipsis): Likewise.
678 2014-08-13  Andrew Sutton  <andrew.n.sutton@gmail.com>
680         * pt.c (lookup_template_variable): Make dependent variable templates
681         have unknown type.
683 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
685         * parser.c (cp_parser_elaborated_type_specifier): Handle
686         specially cp_parser_template_id returning a BASELINK.
688 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
690         * parser.c (cp_parser_diagnose_invalid_type_name,
691         cp_parser_make_typename_type): Remove scope parameter.
692         (cp_parser_parse_and_diagnose_invalid_type_name,
693         cp_parser_elaborated_type_specifier): Adjust calls.
695 2014-08-12  Ville Voutilainen  <ville.voutilainen@gmail.com>
697         Reject virt-specifiers on friends and member templates
698         * friend.c (do_friend): Diagnose virt-specifiers.
699         * pt.c (push_template_decl_real): Diagnose virt-specifiers.
701 2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
703         * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
704         return type to bool; in C++11 for constants give errors, not pedwarns.
705         * cp-tree.h (check_narrowing): Adjust declaration.
706         * call.c (convert_like_real): Update calls.
707         * semantics.c (finish_compound_literal): Likewise.
709 2014-08-08  Jason Merrill  <jason@redhat.com>
711         * pt.c (lookup_template_class_1): Copy abi_tag.
713 2014-08-08  Kai Tietz  <ktietz@redhat.com>
715         * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
716         that we operate on a true inline.
718 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
720         * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
721         optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
723 2014-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
725         PR c++/51312
726         * decl.c (build_enumerator): Handle class types with conversion
727         operators via perform_implicit_conversion_flags and
728         build_expr_type_conversion.
730         * cvt.c (build_expr_type_conversion): Replace pair of errors
731         with error + inform.
733 2014-08-07  Jason Merrill  <jason@redhat.com>
735         PR c++/62043
736         * parser.c (c_parse_file): Change sorry to fatal_error.
738         PR c++/61959
739         * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
741 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
743         * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
745 2014-08-06  Jason Merrill  <jason@redhat.com>
747         * init.c (build_vec_init): Fix constant initialization of
748         trailing elements.
749         (build_value_init_noctor): Call maybe_constant_init.
750         * semantics.c (maybe_constant_init): See through EXPR_STMT and
751         conversion to void.
753         PR c++/60417
754         * init.c (build_vec_init): Reorganize earlier change a bit.
756         PR c++/61994
757         * init.c (build_vec_init): Leave atype an ARRAY_TYPE
758         if we're just returning an INIT_EXPR.
760 2014-08-06  Jason Merrill  <jason@redhat.com>
761             Braden Obrzut  <admin@maniacsvault.net>
763         * pt.c (check_explicit_specialization): Don't test
764         DECL_DECLARED_INLINE_P for a variable template.
766 2014-08-06  Paolo Carlini  <paolo.carlini@oracle.com>
768         PR c++/43906
769         * typeck.c (cp_build_binary_op): Extend to more cases the
770         -Waddress warning.
772 2014-08-01  Braden Obrzut  <admin@maniacsvault.net>
774         Implement constexpr variable templates
775         * decl.c (grokvardecl): Handle specializations of variable templates.
776         (grokdeclarator): Handle variable template id expressions and NULL_TREE
777         return from grokvardecl.
778         * decl2.c (check_member_template): Allow declaration of template member
779         variables.
780         * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
781         variable templates.
782         * pt.c (check_template_variable): Accept variable temploids at
783         non-class scope.
784         (push_template_decl_real): The current instantiation of a template
785         can be a VAR_DECL.
786         (determine_specialization): Accept variable templates.
787         (check_explicit_specialization): Handle and check for malformed
788         variable template specializations.
789         (lookup_template_variable): New.
790         (tsubst_decl): Handle variable template specializations.
791         (do_decl_instantiation): Handle template variables.
792         (instantiate_decl): Handle template variables.
793         * semantics.c (finish_template_variable): New.
794         (finish_id_expression): Instantiate variable templates.
795         * cp-tree.h (variable_template_p): New.
797 2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
799         PR c++/15339
800         * decl.c (check_redeclaration_no_default_args): New.
801         (duplicate_decls): Use it, handle default arguments
802         in redeclarations of function templates.
804 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
806         * optimize.c, semantics.c: Use hash_map instead of pointer_map.
808 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
810         * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
811         method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
812         instead of pointer_set.
814 2014-08-01  Jason Merrill  <jason@redhat.com>
816         PR c++/60417
817         * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
818         init-list for trailing elements.
819         * typeck2.c (process_init_constructor_array): Likewise.
821 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
823         DR 217 again
824         * decl.c (duplicate_decls): Handle static member functions too.
826 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
828         * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
829         in error output.
831 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
833         PR other/61963
834         * parser.c (cp_parser_array_notation): Added check for array_type.
836 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
838         PR middle-end/61455
839         * cp-array-notation.c (expand_array_notation_exprs): Handling of
840         DECL_EXPR improved. Changed handling for INIT_EXPR.
842 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
844         * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
846 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
848         * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
849         -fsanitize=alignment call ubsan_maybe_instrument_reference
850         for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
851         for calls to member functions.
853 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
855         PR c++/60517
856         * typeck.c (maybe_warn_about_returning_address_of_local): Return
857         whether it is returning the address of a local variable.
858         (check_return_expr): Return 0 instead of the address of a local
859         variable.
861 2014-07-30  Jason Merrill  <jason@redhat.com>
863         PR lto/53808
864         PR c++/61659
865         * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
867 2014-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
869         PR c++/57397
870         * pt.c (unify_arity): Add boolean parameter.
871         (unify_too_few_arguments): Likewise.
872         (type_unification_real): Diagnose correctly insufficient
873         arguments in the presence of trailing variadic parameters;
874         deducing multiple trailing packs as empty is fine.
876 2014-07-30  Jason Merrill  <jason@redhat.com>
878         PR c++/61659
879         PR c++/61687
880         Revert:
881         * decl2.c (mark_all_virtuals): New variable.
882         (maybe_emit_vtables): Check it instead of flag_devirtualize.
883         (cp_write_global_declarations): Set it and give helpful diagnostic
884         if it introduces errors.
885         * class.c (finish_struct_1): Check it.
887         PR lto/53808
888         PR c++/61659
889         * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
890         (check_explicit_specialization): Clear it on specializations.
891         * decl.c (duplicate_decls, start_decl): Likewise.
892         (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
893         * method.c (implicitly_declare_fn): Set DECL_COMDAT.  Determine
894         linkage after setting the appropriate flags.
895         * tree.c (decl_linkage): Don't check DECL_COMDAT.
896         * decl2.c (mark_needed): Mark clones.
897         (import_export_decl): Not here.
899 2014-07-25  Edward Smith-Rowland  <3dw4rd@verizon.net>
901         Implement N4051 - Allow typename in a template template parameter
902         * parser.c (cp_parser_type_parameter_key): New funtion;
903         (cp_parser_token_is_type_parameter_key): Ditto;
904         (cp_parser_type_parameter): Look for type-parameter-key for all versions
905         but pedwarn for less than cxx1z.
907 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
909         PR c++/50961
910         * call.c (standard_conversion): Use resolve_nondeduced_context
911         for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
913 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
915         PR c++/61804
916         * parser.c (cp_parser_tokens_start_cast_expression): Return -1
917         for '++' and '--'.
919 2014-07-15  Jason Merrill  <jason@redhat.com>
921         PR c++/61811
922         * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
924         PR c++/60848
925         PR c++/61723
926         * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
927         * class.c (finish_struct): Reject invalid definition of
928         std::initializer_list.
930 2014-07-15  Paolo Carlini  <paolo.carlini@oracle.com>
932         * call.c (convert_like_real): Call print_z_candidate and inform only
933         if permerror returns true.
935 2014-07-14  Jan Hubicka  <hubicka@ucw.cz>
937         * class.c (build_clone): Do not clear assembler names of
938         templates.
939         * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
940         * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
941         as a special case return sizeof (struct tree_decl_non_common)
942         for other decls.
943         (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
944         initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
945         * cp/cp-tree.h (tree_template_decl): New structure.
946         (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
947         (union cp_lang_tree_node): Add template_decl.
948         (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
950 2014-07-14  Jason Merrill  <jason@redhat.com>
952         PR c++/61445
953         PR c++/56947
954         * pt.c (instantiate_decl): Don't check defer_ok for local class
955         members.
957 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
959         PR middle-end/61294
960         * cp-tree.h (LITERAL_ZERO_P): Define.
961         * parser.c (cp_parser_parenthesized_expression_list): Add
962         want_literal_zero_p argument, if true, for literal zeros
963         insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
964         (cp_parser_postfix_expression): Adjust
965         cp_parser_parenthesized_expression_list caller, handle
966         -Wmemset-transposed-args.
967         (literal_zeros): New variable.
969 2014-07-13  Jason Merrill  <jason@redhat.com>
971         PR c++/58511
972         * semantics.c (is_instantiation_of_constexpr): Return true for
973         defaulted functions, too.
974         (explain_invalid_constexpr_fn): Only use
975         explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
976         * method.c (explain_implicit_non_constexpr): Pass
977         DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
979         PR c++/58611
980         * decl.c (check_initializer): Don't finish_compound_literal
981         on erroneous constexpr init.
983         PR c++/58612
984         * tree.c (bot_replace): Only replace a dummy 'this' parm.
986         PR c++/60628
987         * decl.c (create_array_type_for_decl): Only check for auto once.
989         PR c++/58636
990         * call.c (build_list_conv): Don't try to build a list of references.
992 2014-07-13  Edward Smith-Rowland  <3dw4rd@verizon.net>
994         PR C++/60209 - Declaration of user-defined literal operator cause error
995         * parser.c (cp_parser_operator): Fold treatment of strings
996         and user-defined string literals.  Use the full string parser.
997         (cp_parser_string_literal): Add flag to not look for literal operator.
999 2014-07-11  Jason Merrill  <jason@redhat.com>
1001         PR c++/22434
1002         PR c++/61288
1003         * call.c (build_conditional_expr_1): Avoid reading freed memory.
1005 2014-07-11  Paolo Carlini  <paolo.carlini@oracle.com>
1007         PR c++/53159
1008         * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1009         into convflags.
1010         * decl.c (check_initializer): Don't call check_narrowing here,
1011         set LOOKUP_NO_NARROWING.
1012         * typeck2.c (digest_init_r): Likewise.
1014 2014-07-10  Jason Merrill  <jason@redhat.com>
1016         PR c++/61661
1017         * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1019         PR c++/61659
1020         PR c++/61687
1021         * decl2.c (mark_all_virtuals): New variable.
1022         (maybe_emit_vtables): Check it instead of flag_devirtualize.
1023         (cp_write_global_declarations): Set it and give helpful diagnostic
1024         if it introduces errors.
1025         * class.c (finish_struct_1): Check it.
1026         * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1028 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1030         PR c++/60686
1031         * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1032         outside class declaration, in friend declaration, and neither on
1033         constructor nor conversion operator.
1035 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1037         DR 1584
1038         PR c++/57466
1039         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1040         cv-qualifiers of function types.
1042 2014-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
1043             Paolo Carlini  <paolo.carlini@oracle.com>
1045         PR c++/59361
1046         * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1047         CPP_ELLIPSIS too.
1049 2014-07-07  Paolo Carlini  <paolo.carlini@oracle.com>
1051         * class.c (check_for_override): Wrap the 'final' and 'override'
1052         keywords in %< and %>.
1054 2014-07-06  Marek Polacek  <polacek@redhat.com>
1056         PR c/6940
1057         * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1058         * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1059         * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1060         function parameter.
1062 2014-07-02  Paolo Carlini  <paolo.carlini@oracle.com>
1064         * pt.c (convert_template_argument): Use inform instead of error in
1065         three places.
1067 2014-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
1069         PR c++/58781
1070         PR c++/60249
1071         PR c++/59867
1072         * parser.c (cp_parser_userdef_string_literal): Take a tree
1073         not a cp_token*.
1074         (cp_parser_string_literal): Don't hack the token stream.
1076 2014-06-30  Jason Merrill  <jason@redhat.com>
1078         PR c++/61659
1079         PR lto/53808
1080         * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1081         devirtualizing.
1082         * init.c (build_vtbl_address): Don't mark destructor.
1083         * class.c (finish_struct_1): Add all classes to keyed_classes
1084         if devirtualizing.
1086         PR c++/61647
1087         * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1089         PR c++/61566
1090         * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1092         * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1093         TYPE_BINFO or TYPE_LANG_SPECIFIC.
1094         * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1095         (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1096         * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1097         * pt.c (unify): Also check whether the argument is a PMF.
1099 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
1101         PR c++/54891
1102         * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1103         a '[' can also start a primary-expression.
1104         (cp_parser_cast_expression): Parse a cast-expression only tentatively
1105         when cp_parser_tokens_start_cast_expression returns -1.
1107 2014-06-30  Jason Merrill  <jason@redhat.com>
1109         PR c++/61539
1110         * pt.c (unify_one_argument): Type/expression mismatch just causes
1111         deduction failure.
1113         * semantics.c (simplify_aggr_init_expr): Remove remnants of
1114         2014-04-11 change.
1116 2014-06-30  Marek Polacek  <polacek@redhat.com>
1118         * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1119         function has no_sanitize_undefined attribute.
1120         * decl.c (compute_array_index_type): Don't instrument VLAs if the
1121         function has no_sanitize_undefined attribute.
1123 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
1125         PR middle-end/57541
1126         * cp-array-notation.c (expand_sec_reduce_builtin):
1127         Check that bultin argument is correct.
1128         * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1130 2014-06-28  Jonathan Wakely  <jwakely@redhat.com>
1132         DR 1579
1133         PR c++/58051
1134         * typeck.c (check_return_expr): Lookup as an rvalue even when the
1135         types aren't the same.
1137 2014-06-27  Jason Merrill  <jason@redhat.com>
1139         PR c++/61433
1140         * error.c (dump_template_bindings): Don't tsubst in a clone.
1142 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1144         PR c++/61614
1145         * semantics.c (finish_compound_literal): Revert r204228.
1147 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1149         * parser.c (cp_parser_compound_literal_p): New.
1150         (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1152 2014-06-26  Jason Merrill  <jason@redhat.com>
1154         * parser.c (cp_parser_for_init_statement): Change range-for error
1155         to pedwarn.
1157         N3994 Ranged-based for-loops: The Next Generation
1158         * parser.c (cp_lexer_nth_token_is): New.
1159         (cp_parser_for_init_statement): Allow "for (id : init)".
1161 2014-06-26  Teresa Johnson  <tejohnson@google.com>
1163         * class.c (dump_class_hierarchy): Use saved dump files.
1164         (dump_vtable): Ditto.
1165         (dump_vtt): Ditto.
1167 2014-06-26  Adam Butcher  <adam@jessamine.co.uk>
1169         PR c++/61537
1170         * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1171         parameter lists outside of function parameter scope.
1173 2014-06-25  Paolo Carlini  <paolo.carlini@oracle.com>
1175         DR 178
1176         PR c++/49132
1177         * typeck2.c (process_init_constructor_record): Do not complain about
1178         uninitialized const members, because within aggregate-initialization,
1179         members without explicit initializers are value-initialized.
1181 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
1183         * semantics.c (finish_omp_clauses): Make sure
1184         OMP_CLAUSE_LINEAR_STEP has correct type.
1186 2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
1188         * class.c (check_methods, create_vtable_ptr, determine_key_method,
1189         add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1190         FUNCTION_DECL check.
1191         * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1192         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1193         (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1194         (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1196 2014-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
1198         PR c++/33972
1199         * decl.c (grokdeclarator): Do not early check for operator-function-id
1200         as non-function.
1202 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
1204         * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1205         Adjust.
1207 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
1209         * parser.c (cp_parser_omp_for_loop): For
1210         #pragma omp parallel for simd move lastprivate clause from parallel
1211         to for rather than simd.
1213 2014-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
1215         DR 577
1216         PR c++/33101
1217         * decl.c (grokparms): Accept a single parameter of type 'void'.
1219 2014-06-20  Jason Merrill  <jason@redhat.com>
1221         PR c++/59296
1222         * call.c (add_function_candidate): Avoid special 'this' handling
1223         if we have a ref-qualifier.
1225         PR c++/61556
1226         * call.c (build_over_call): Call build_this in template path.
1228 2014-06-19  Jason Merrill  <jason@redhat.com>
1230         PR c++/59296
1231         * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1233 2014-06-18  Jason Merrill  <jason@redhat.com>
1235         PR c++/59296
1236         * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1237         ref-qualifier handling.
1239         PR c++/61507
1240         * pt.c (resolve_overloaded_unification): Preserve
1241         ARGUMENT_PACK_EXPLICIT_ARGS.
1243 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
1245         * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1246         argument.
1247         * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1249 2014-06-17  Jason Merrill  <jason@redhat.com>
1251         PR c++/60605
1252         * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1254 2014-06-15  Jason Merrill  <jason@redhat.com>
1256         PR c++/61488
1257         * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1259         PR c++/61500
1260         * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1262 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1264         * decl.c (grokvardecl): Fix pasto in previous patch.
1266 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1268         * decl.c (duplicate_decls): Use set_decl_tls_model.
1269         (grokdeclarator): Likewise.
1270         * semantics.c (finish_id_expression): Check TLS only for
1271         static variables.
1272         (finish_omp_threadprivate): Use decl_default_tls_model.
1273         * decl2.c (get_guard): Likewise.
1274         * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1276 2014-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1278         PR c++/33101
1279         * decl.c (grokparms): Improve error message about void parameters.
1280         * error.c (type_to_string): Fix aka cut off code.
1282 2014-06-12  Jason Merrill  <jason@redhat.com>
1284         * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1285         * cvt.c (type_promotes_to): Likewise.
1286         * mangle.c (write_type, write_expression): Likewise.
1287         (write_name, write_template_arg): Likewise.
1288         (mangle_decl): Make alias based on flag_abi_compat_version.
1289         Emit -Wabi warning here.
1290         (finish_mangling_internal): Not here.  Drop warn parm.
1291         (finish_mangling_get_identifier, finish_mangling): Adjust.
1292         (mangle_type_string, mangle_special_for_type): Adjust.
1293         (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1294         (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1295         (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1297         * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1298         * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1299         (layout_nonempty_base_or_field, end_of_class): Likewise.
1300         (layout_empty_base, build_base_field, layout_class_type): Likewise.
1301         (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1302         (layout_virtual_bases): Likewise.
1303         * decl.c (compute_array_index_type): Likewise.
1304         * mangle.c (write_mangled_name, write_prefix): Likewise.
1305         (write_template_prefix, write_integer_cst, write_expression): Likewise.
1306         (write_template_arg, write_array_type): Likewise.
1307         * method.c (lazily_declare_fn): Likewise.
1308         * rtti.c (get_pseudo_ti_index): Likewise.
1309         * typeck.c (comp_array_types): Likewise.
1311 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
1313         * vtable-class-hierarchy.c: Update handling for section names
1314         that are no longer trees.
1315         * decl.c (duplicate_decls): Likewise.
1317 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1319         PR c++/19200
1320         * parser.c (cp_parser_init_declarator): Actually pass friend_p
1321         to cp_parser_declarator.
1323 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1325         PR c++/60265
1326         * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1327         * name-lookup.c (validate_nonmember_using_decl): Adjust error
1328         message.
1330 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1332         PR c++/19200
1333         * parser.c (cp_parser_declarator): Add bool parameter.
1334         (cp_parser_direct_declarator): Likewise, use it.
1335         (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1336         (cp_parser_condition, cp_parser_explicit_instantiation,
1337         cp_parser_init_declarator, cp_parser_type_id_1,
1338         cp_parser_parameter_declaration, cp_parser_exception_declaration,
1339         cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1340         cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1341         Adjust.
1342         * decl.c (grokdeclarator): Fix handling of friend declared in
1343         namespace scope (g++.dg/parse/friend10.C).
1345 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
1347         * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1348         ->implicit_section.
1349         * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1350         (maybe_clone_body): Move symbol across comdat groups.
1351         * method.c (use_thunk): Copy implicit section flag.
1353 2014-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1355         PR c++/22556
1356         * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1358 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
1360         * method.c (use_thunk): Use set_decl_section_name.
1361         * optimize.c (maybe_clone_body): Use set_decl_section_name.
1362         * decl.c (duplicate_decls): Likewise.
1363         * vtable-class-hierarchy.c: Likewise.
1365 2014-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
1367         PR c++/60184
1368         * class.c (check_field_decls): In C++11 mode do not reject
1369         static data members and reference-type members in unions.
1371 2014-06-05  Jason Merrill  <jason@redhat.com>
1373         PR c++/43453
1374         * decl.c (check_initializer): Collapse a TREE_LIST here.
1375         * typeck2.c (store_init_value): Not here.
1377 2014-06-05  Richard Biener  <rguenther@suse.de>
1378             Paolo Carlini  <paolo.carlini@oracle.com>
1380         PR c++/56961
1381         * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1382         handling of empty classes.
1384 2014-06-04  Jason Merrill  <jason@redhat.com>
1386         * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1387         for noexcept and thread_local, too.
1389         PR c++/61343
1390         * decl.c (check_initializer): Maybe clear
1391         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1393 2014-06-05  Richard Biener  <rguenther@suse.de>
1395         PR c++/61004
1396         * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1397         warnings for accessing empty classes.
1399 2014-06-05  Marek Polacek  <polacek@redhat.com>
1401         PR c/49706
1402         * parser.c (cp_parser_binary_expression): Warn when logical not is
1403         used on the left hand side operand of a comparison.
1405 2014-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
1407         PR c++/43453
1408         * typeck.c (cp_build_modify_expr): Handle array of characters
1409         initialized by a string literal.
1410         * decl.c (check_initializer): Handle parenthesized string literal
1411         as initializer.
1412         * typeck2.c (store_init_value): Remove redundant check.
1414 2014-06-04  Jason Merrill  <jason@redhat.com>
1416         PR c++/51253
1417         PR c++/61382
1418         * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1419         * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1421 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
1423         PR c/58942
1424         * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1425         with a pointer.
1427 2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1429         DR 1423
1430         PR c++/52174
1431         * call.c (standard_conversion): Convert nullptr to bool only
1432         in case of direct-initialization.
1433         (convert_like_real): Provide informative error message.
1435 2014-06-03  Marek Polacek  <polacek@redhat.com>
1437         PR c/60439
1438         * semantics.c (finish_switch_cond): Warn if switch condition has
1439         boolean value.
1441 2014-06-03  Jason Merrill  <jason@redhat.com>
1443         PR c++/60992
1444         * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first.  Add a new
1445         variable to local_specializations.
1447         PR c++/60848
1448         * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1450 2014-06-02  Jason Merrill  <jason@redhat.com>
1452         PR c++/61046
1453         * decl.c (reshape_init_class): Handle un-folded
1454         constant-expressions.
1456         PR c++/61134
1457         * pt.c (pack_deducible_p): Handle canonicalization.
1459 2014-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1461         * pt.c (tsubst_function_type): Initialize arg_types.
1463 2014-06-02  Siva Chandra Reddy  <sivachandra@google.com>
1465         PR debug/57519
1466         * class.c (handle_using_decl): Pass the correct scope to
1467         cp_emit_debug_info_for_using.
1469 2014-06-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1471         PR c++/59483
1472         PR c++/61148
1473         * search.c (accessible_p): Use current_nonlambda_class_type.
1474         * semantics.c (check_accessibility_of_qualified_id): Likewise.
1476 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1478         * decl.c: Include builtins.h.
1479         * semantics.c: Likewise.
1481 2014-05-31  Paolo Carlini  <paolo.carlini@oracle.com>
1483         DR 1227
1484         PR c++/57543
1485         * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1486         * pt.c (tsubst_function_type): Inject the this parameter; do the
1487         substitutions in the order mandated by the DR.
1488         (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1489         * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1490         (static_fn_type): Copy it.
1491         * decl2.c (build_memfn_type, change_return_type,
1492         cp_reconstruct_complex_type): Likewise.
1493         * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1494         * tree.c (strip_typedefs): Likewise.
1495         * typeck.c (merge_types): Likewise.
1497 2014-05-30  Jason Merrill  <jason@redhat.com>
1499         PR c++/56947
1500         * pt.c (instantiate_decl): Check that defer_ok is not set for
1501         local class members.
1503         PR c++/60992
1504         * pt.c (tsubst_init): Split out from...
1505         (tsubst_expr) [DECL_EXPR]: Here.
1506         (tsubst_copy) [VAR_DECL]: Use it.
1507         * semantics.c (finish_id_expression): Return the decl for static/const.
1509 2014-05-28  Jason Merrill  <jason@redhat.com>
1511         PR c++/47202
1512         * decl.c (cxx_comdat_group): Return a decl.
1513         * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1515         * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1516         bound.
1518         PR c++/61242
1519         * call.c (build_aggr_conv): Ignore passed in flags.
1520         (build_array_conv, build_complex_conv): Likewise.
1522 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1524         * optimize.c (maybe_thunk_body): Use set_comdat_group.
1525         (maybe_clone_body): Likewise.
1526         * decl.c (duplicate_decls): Update code duplicating comdat group;
1527         do not copy symtab pointer; before freeing newdecl remove it
1528         from symtab.
1529         * decl2.c (constrain_visibility): Use set_comdat_group.
1531 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1533         * rtti.c: Include tm_p.h
1534         (emit_tinfo_decl): Force RTTI data to be aligned to required
1535         ABI alignment only.
1537 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1539         * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
1540         ignoring other target adjustments.
1542 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1544         * semantics.c (finish_omp_clauses): Remove duplicated variable
1545         initialization.
1547         * parser.c (cp_parser_omp_target): Return bool values.
1549 2014-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1551         PR c++/61088
1552         * lambda.c (add_capture): Enforce that capture by value requires
1553         complete type.
1554         * typeck2.c (cxx_incomplete_type_inform): Early return if
1555         TYPE_MAIN_DECL is null.
1557 2014-05-21  Jonathan Wakely  <jwakely@redhat.com>
1559         PR c/61271
1560         * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
1562 2014-05-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
1564         PR c++/61133
1565         * lambda.c (build_capture_proxy, add_capture): Treat normal
1566         captures and init-captures identically.
1568 2014-05-21  Mark Wielaard  <mjw@redhat.com>
1570         PR debug/16063
1571         * cp-lang.c (cxx_enum_underlying_base_type): New function.
1572         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
1574 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
1576         * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
1577         * cp-array-notation.c (replace_invariant_exprs): Likewise.
1578         (expand_array_notation): Handle VOID_CST.
1579         * error.c (dump_expr): Likewise.
1580         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1581         (cxx_pretty_printer::expression): Likewise.
1582         (pp_cxx_new_expression): Use void_node instead of void_zero_node.
1583         * decl.c (register_dtor_fn): Likewise.
1584         * init.c (build_raw_new_expr, build_new_1, build_vec_init)
1585         (build_delete, push_base_cleanups): Likewise.
1586         * mangle.c (write_expression): Likewise.
1587         * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
1588         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1589         (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
1590         * tree.c (cp_tree_equal): Likewise.
1591         (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
1592         instead of void_zero_node.
1593         * typeck.c (check_return_expr): Likewise.
1594         * typeck2.c (build_functional_cast): Likewise.
1596 2014-05-21  Igor Zamyatin  <igor.zamyatin@intel.com>
1598         PR c/60189
1599         * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
1600         from here to...
1601         (cp_parser_statement): ...here. Make sure only semicolon can go after
1602         Cilk_sync.
1604 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1606         PR c++/58753
1607         PR c++/58930
1608         PR c++/58704
1609         * typeck2.c (digest_nsdmi_init): New.
1610         * parser.c (cp_parser_late_parse_one_default_arg): Use it.
1611         * init.c (get_nsdmi): Likewise.
1612         * cp-tree.h (digest_nsdmi_init): Declare.
1614 2014-05-20  Jason Merrill  <jason@redhat.com>
1616         * typeck.c (get_member_function_from_ptrfunc): Don't try to look
1617         up a virtual function in a dummy object.
1619 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1621         PR c++/60373
1622         * decl.c (duplicate_decls): Replace pair of warning_at with
1623         warning_at + inform.
1624         (maybe_commonize_var): Likewise.
1626 2014-05-20  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
1628         PR bootstrap/61210
1629         * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
1630         (tsubst_copy_and_build): Perform recursive substitutions in a
1631         deterministic order.
1633 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1635         PR c++/58664
1636         * typeck2.c (cxx_incomplete_type_inform): New.
1637         (cxx_incomplete_type_diagnostic): Use it.
1638         * decl.c (grokdeclarator): Check the element type of an
1639         incomplete array type; call the above.
1640         * cp-tree.h (cxx_incomplete_type_inform): Declare.
1642 2014-05-19  Jason Merrill  <jason@redhat.com>
1644         PR c++/58761
1645         * pt.c (tsubst_copy): Don't check at_function_scope_p.
1646         (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
1648 2014-05-19  Paolo Carlini  <paolo.carlini@oracle.com>
1650         * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
1651         * parser.c (cp_parser_enum_specifier): Likewise.
1653 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
1655         * class.c (sorted_fields_type_new): Adjust.
1656         * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
1657         * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1658         * cp-tree.h: Remove usage of variable_size gty attribute.
1659         * decl.c (make_label_decl): Adjust.
1660         (check_goto): Likewise.
1661         (start_preparsed_function): Likewise.
1662         (save_function_data): Likewise.
1663         * lex.c (init_reswords): Likewise.
1664         (retrofit_lang_decl): Likewise.
1665         (cxx_dup_lang_specific_decl): Likewise.
1666         (copy_lang_type): Likewise.
1667         (cxx_make_type): Likewise.
1668         * name-lookup.c (binding_entry_make): Likewise.
1669         (binding_table_construct): Likewise.
1670         (binding_table_new): Likewise.
1671         (cxx_binding_make): Likewise.
1672         (pushdecl_maybe_friend_1): Likewise.
1673         (begin_scope): Likewise.
1674         (push_to_top_level): Likewise.
1675         * parser.c (cp_lexer_alloc): Likewise.
1676         (cp_lexer_new_from_tokens): Likewise.
1677         (cp_token_cache_new): Likewise.
1678         (cp_parser_context_new): Likewise.
1679         (cp_parser_new): Likewise.
1680         (cp_parser_nested_name_specifier_opt): Likewise.
1681         (cp_parser_template_id): Likewise.
1682         * pt.c (maybe_process_partial_specialization): Likewise.
1683         (register_specialization): Likewise.
1684         (add_pending_template): Likewise.
1685         (lookup_template_class_1): Likewise.
1686         (push_tinst_level): Likewise.
1687         * semantics.c (register_constexpr_fundef): Likewise.
1688         (cxx_eval_call_expression): Likewise.
1689         * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
1691 2014-05-16  Paolo Carlini  <paolo.carlini@oracle.com>
1693         PR c++/51640
1694         * parser.c (cp_parser_diagnose_invalid_type_name): Early return
1695         when cp_parser_lookup_name sets ambiguous_decls.
1697 2014-05-15  Jason Merrill  <jason@redhat.com>
1699         * call.c (print_conversion_rejection): Use loc consistently.
1701 2014-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
1703         * cp-tree.h (DIRECT_LIST_INIT_P): Add.
1704         * call.c (convert_like_real, build_new_method_call_1): Use it.
1705         * decl2.c (grokfield): Likewise.
1706         * init.c (perform_member_init, build_aggr_init, expand_default_init,
1707         build_new_1): Likewise.
1708         * mangle.c (write_expression): Likewise.
1709         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1711 2014-05-14  Jason Merrill  <jason@redhat.com>
1713         PR c++/20332
1714         PR c++/21631
1715         * call.c (reference_binding): Treat lvalue/rvalue mismatch and
1716         dropped cv-quals as a bad conversion.
1717         (convert_like_real) [ck_ref_bind]: Explain them.
1718         (compare_ics): Check badness before stripping reference
1719         bindings.  Handle comparing bad reference bindings.
1720         * typeck.c (comp_cv_qualification): Add overload that just takes
1721         integers.
1722         * cp-tree.h: Declare it.
1724         * call.c (struct conversion_info): Rename 'from_type' to 'from'.
1725         (arg_conversion_rejection, bad_arg_conversion_rejection)
1726         (explicit_conversion_rejection, template_conversion_rejection): Adjust.
1727         (add_function_candidate): Pass actual argument, rather than type, to
1728         bad_arg_conversion_rejection.
1729         (print_conversion_rejection): Explain what's wrong with the conversion.
1730         (print_z_candidates): Say "candidate:" before each candidate.
1731         (splice_viable): Be strict if we see a viable or template candidate.
1732         (build_user_type_conversion_1): Pass false to strict parameter.
1733         (perform_overload_resolution, build_conditional_expr_1): Likewise.
1734         (build_new_op_1, build_new_method_call_1): Likewise.
1735         (build_op_call_1): Pass true to strict parameter.
1737 2014-05-13  Jason Merrill  <jason@redhat.com>
1739         * call.c (print_error_for_call_failure): Say "no match" rather
1740         than "ambiguous" if there were no strict matches.
1741         (build_new_method_call_1): Likewise.
1743         PR c++/61151
1744         * semantics.c (is_this_parameter): Allow capture proxies too.
1746 2014-05-12  Jason Merrill  <jason@redhat.com>
1748         * call.c (maybe_print_user_conv_context): New.
1749         (convert_like_real): Use it.  Print call context for bad
1750         user-defined conversion.
1751         (build_over_call): Print call context for bad 'this' conversion.
1753         * call.c (convert_like_real): Use inform for identifying the
1754         declaration point.
1756 2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
1758         * cvt.c (cp_convert_to_pointer): Don't call error_at if
1759         complain & tf_error is false.
1761         * decl.c (make_unbound_class_template): Prefer inform for
1762         "declared here"-type message.
1764 2014-05-09  Momchil Velikov  <momchil.velikov@gmail.com>
1766         PR c++/60463
1767         PR c++/60755
1768         * lambda.c (lambda_expr_this_capture): Add new parameter
1769         add_capture_p controlling whether the functions will try to
1770         capture 'this' via the default capture.
1771         (maybe_resolve_dummy): Likewise.
1772         * cp-tree.h: Adjust prototypes.
1773         * call.c, semantics.c: Change callers of these functions.
1774         * call.c (build_new_method_call_1): Use the actual 'this' that
1775         would be potentially captured for the overload resolution, instead
1776         of the dummy object.
1778 2014-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
1780         * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
1781         parameter.
1782         (convert_nontype_argument): Adjust calls.
1783         (coerce_template_parameter_pack): Add missing complain & tf_error
1784         check.
1786 2014-05-09  Jason Merrill  <jason@redhat.com>
1788         DR 587
1789         PR c++/51317
1790         * call.c (build_conditional_expr_1, conditional_conversion): Handle
1791         non-class lvalues and xvalues that differ only in cv-qualifiers.
1793         DR 5
1794         PR c++/60019
1795         * call.c (build_user_type_conversion_1): The copy-init temporary
1796         is cv-unqualified.
1798         PR c++/58714
1799         * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
1801         PR c++/54348
1802         * call.c (build_conditional_expr_1): If overload resolution finds
1803         no match, just say "different types".
1805         PR c++/32019
1806         * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
1808         PR c++/22434
1809         * call.c (build_conditional_expr_1): Don't try to pool cv-quals
1810         if we didn't find a conversion.
1811         Don't accept a bad conversion too early.
1813 2014-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
1815         PR c++/13981
1816         * typeck.c (convert_for_assignment): Provide an inform for pointers
1817         to incomplete class types.
1819 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
1821         PR c++/61083
1822         * pt.c (convert_nontype_argument): Protect all the error calls
1823         with complain & tf_error.
1825 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
1827         PR c++/61080
1828         * pt.c (instantiate_decl): Avoid generating the body of a
1829         deleted function.
1831 2014-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1833         PR c++/60999
1834         * pt.c (maybe_begin_member_template_processing): Use
1835         uses_template_parms.
1837 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
1838             Mike Stump  <mikestump@comcast.net>
1839             Richard Sandiford  <rdsandiford@googlemail.com>
1841         * call.c: Include wide-int.h.
1842         (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1843         (convert_for_arg_passing): Likewise.
1844         * class.c: Include wide-int.h.
1845         (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
1846         (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1847         (include_empty_classes): Likewise
1848         (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
1849         * cvt.c: Include wide-int.h.
1850         (ignore_overflows): Use wide_int_to_tree.
1851         * decl.c: Include wide-int.h.
1852         (check_array_designated_initializer): Use wide-int interfaces.
1853         (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
1854         (finish_enum_value_list): Use signop.
1855         (build_enumerator): Use wide-int interfaces.
1856         * init.c: Include wide-int.h.
1857         (build_new_1): Use wide-int interfaces.
1858         * mangle.c: Include wide-int.h.
1859         (write_integer_cst): Use wide-int interfaces.
1860         (write_array_type): Likewise.
1861         * tree.c: Include wide-int.h.
1862         (cp_tree_equal): Use tree_int_cst_equal.
1863         * typeck2.c: Include wide-int.h.
1864         (process_init_constructor_array): Use wide-int interfaces.
1866 2014-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1868         PR c++/58582
1869         * decl.c (grokfndecl): Check duplicate_decls return value for
1870         error_mark_node.
1871         * pt.c (instantiate_decl): A deleted function is defined.
1873 2014-05-02  Jason Merrill  <jason@redhat.com>
1875         * decl2.c (vague_linkage_p): Local statics have vague linkage.
1877         PR c++/60992
1878         * lambda.c (lambda_capture_field_type): Wrap anything dependent
1879         other than 'this'.
1880         (add_capture): Check for VLA before calling it.
1881         * semantics.c (is_this_parameter): Accept any 'this' parameter, not
1882         just the current one.  Make non-static.
1883         * cp-tree.h: Declare it.
1884         * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
1885         the operand was static or constant.
1887 2014-05-02  Marek Polacek  <polacek@redhat.com>
1889         * typeck.c (maybe_warn_about_returning_address_of_local): Separate
1890         warning_at calls.
1892 2014-05-01  Marek Polacek  <polacek@redhat.com>
1894         PR c/43395
1895         * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
1896         between label and variable when warning about returning local address.
1898 2014-04-30  Jason Merrill  <jason@redhat.com>
1900         PR c++/60980
1901         * init.c (build_value_init): Don't try to call an array constructor.
1903         PR c++/60951
1904         * typeck2.c (massage_init_elt): Use maybe_constant_init.
1906 2014-04-30  Marek Polacek  <polacek@redhat.com>
1908         * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
1909         even when SANITIZE_FLOAT_DIVIDE is on.  Set doing_div_or_mod even
1910         for non-integer types.
1912 2014-04-29  Jason Merrill  <jason@redhat.com>
1914         DR 1351
1915         Represent the unevaluated exception specification of an implicitly
1916         declared or deleted function with a simple placeholder, not a list
1917         of functions.
1918         * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
1919         * except.c (unevaluated_noexcept_spec): New.
1920         * class.c (deduce_noexcept_on_destructor): Use it.
1921         * decl.c (check_redeclaration_exception_specification): Call
1922         maybe_instantiate_noexcept.
1923         (duplicate_decls): Call it before merge_types.
1924         (start_preparsed_function): Call maybe_instantiate_noexcept.
1925         * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
1926         * init.c (get_nsdmi): Factor out of perform_member_init.
1927         * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
1928         (walk_field_subobs): Consider NSDMI for EH spec.
1929         (get_defaulted_eh_spec): New.
1930         (implicitly_declare_fn): Use unevaluated_noexcept_spec.
1931         (defaulted_late_check): Defer EH checking in non-template classes.
1932         (after_nsdmi_defaulted_late_checks): New.
1933         * parser.c (cp_parser_class_specifier_1): Use it.
1934         (unparsed_classes): New macro.
1935         * parser.h (cp_unparsed_functions_entry_d): Add classes field.
1936         * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
1937         Remove list-of-functions handling.
1938         * typeck2.c (merge_exception_specifiers): Remove list-of-functions
1939         handling and FN parameter.
1940         * typeck.c (merge_types): Adjust.
1942 2014-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
1944         PR c++/59120
1945         * parser.c (cp_parser_alias_declaration): Check return value of
1946         cp_parser_require.
1948 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
1950         * parser.c (cp_parser_omp_atomic): Allow seq_cst before
1951         atomic-clause, allow comma in between atomic-clause and
1952         seq_cst.
1954 2014-04-24  Marc Glisse  <marc.glisse@inria.fr>
1956         PR libstdc++/43622
1957         * rtti.c (emit_support_tinfos): Do not iterate on
1958         registered_builtin_types (partial revert).
1960 2014-04-23 Dinar Temirbulatov  <dtemirbulatov@gmail.com>
1962         PR c++/57958
1963         * semantics.c (apply_deduced_return_type): Complete non-void type
1964         before estimating whether the type is aggregate.
1966 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
1968         PR libstdc++/43622
1969         * rtti.c (emit_support_tinfo_1): New function, extracted from
1970         emit_support_tinfos.
1971         (emit_support_tinfos): Call it and iterate on registered_builtin_types.
1973 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
1975         PR c/59073
1976         * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
1977         fails, don't set OM_PARALLEL_COMBINED and return NULL.
1979 2014-04-18  Jason Merrill  <jason@redhat.com>
1981         DR 1571
1982         * call.c (reference_binding): Recurse on user-defined conversion.
1984         PR c++/60872
1985         * call.c (standard_conversion): Don't try to apply restrict to void.
1987 2014-04-16  Marc Glisse  <marc.glisse@inria.fr>
1989         * decl.c (reshape_init_r): Handle a single element of vector type.
1991 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
1993         PR c++/60765
1994         * decl2.c (cplus_decl_attributes): Handle
1995         pointer-to-member-function declarations.
1997 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
1999         PR c++/60764
2000         * call.c (build_user_type_coversion): Use build_dummy_object
2001         to create the placeholder object for a constructor method call.
2002         (build_special_member_call): Likewise.
2003         (build_over_call): Check for the placeholder object with
2004         is_dummy_object.
2005         (build_new_method_call_1): Likewise.  Don't attempt to resolve
2006         a dummy object for a constructor method call.
2008 2014-04-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
2010         PR c++/59295
2011         * friend.c (add_friend, make_friend_class): Move repeated friend
2012         warning under Wredundant_decls.
2014 2014-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
2016         * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2017         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2018         (do_class_using_decl): Likewise.
2019         * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2021 2014-04-15  Jakub Jelinek  <jakub@redhat.com>
2023         PR plugins/59335
2024         * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2026 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2028         * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2030 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2032         * pt.c (mark_template_parm): Use template_parm_level_and_index.
2034 2014-04-11  Jason Merrill  <jason@redhat.com>
2036         * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2037         * parser.c: Adjust.
2038         (cp_lexer_get_preprocessor_token): Always clear it.
2039         (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2041         DR 1467
2042         PR c++/51747
2043         * decl.c (reshape_init_r): Handle a single element of class type.
2045         DR 1338
2046         * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2047         built-in operator new.
2049 2014-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2051         PR c++/58600
2052         * name-lookup.c (parse_using_directive): Return early if the
2053         attribs argument is error_mark_node; use get_attribute_name.
2055 2014-04-11  Jason Merrill  <jason@redhat.com>
2057         DR 1030
2058         PR c++/51253
2059         * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2060         * call.c (struct z_candidate): Add flags field.
2061         (add_candidate): Add flags parm.
2062         (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2063         (add_template_candidate_real): Pass it.
2064         (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2065         * tree.c (build_aggr_init_expr): Copy it.
2066         * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2068 2014-04-10  Richard Biener  <rguenther@suse.de>
2069             Jakub Jelinek  <jakub@redhat.com>
2071         PR ipa/60761
2072         * error.c (dump_decl) <case FUNCTION_DECL>: If
2073         DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2074         recurse on DECL_ABSTRACT_ORIGIN instead of printing
2075         <built-in>.
2077 2014-04-09  Fabien Chêne  <fabien@gcc.gnu.org>
2079         * pt.c (check_template_variable): Check for the return of pedwarn
2080         before emitting a note.
2081         * parser.c (cp_parser_lambda_introducer): Likewise.
2083 2014-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
2085         PR c++/59115
2086         * pt.c (process_template_parm): For an invalid non-type parameter
2087         only set TREE_TYPE to error_mark_node.
2088         (push_inline_template_parms_recursive, comp_template_parms,
2089         redeclare_class_template, coerce_template_template_parm,
2090         coerce_template_template_parms, unify): Use error_operand_p.
2092 2014-04-08  Nathan Sidwell  <nathan@codesourcery.com>
2094         * class.c (check_bases_and_members): Warn about non-virtual dtors
2095         in public bases only.  Check warn_ecpp before complaining about
2096         non-polymorphic bases.
2098 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2100         * decl.c (duplicate_decls): Check for the return of warning_at
2101         before emitting a note.
2102         (warn_misplaced_attr_for_class_type): Likewise.
2103         (check_tag_decl): Likewise.
2105 2014-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
2107         PR c++/58207
2108         * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2110 2014-04-04  Patrick Palka  <patrick@parcs.ath.cx>
2112         PR c++/44613
2113         * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2114         * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2115         instantiating a variable-sized type.
2117         PR c++/21113
2118         * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2120 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2122         * class.c (find_abi_tags_r): Check for the return of warning
2123         before emitting a note.
2124         (one_inherited_ctor): Likewise.
2126 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
2128         * decl.c (duplicate_decls): Check for the return of permerror
2129         before emitting a note.
2131 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
2133         * class.c (accessible_nvdtor_p): New.
2134         (check_bases): Don't check base destructor here ...
2135         (check_bases_and_members): ... check them here.  Trigger on
2136         Wnon-virtual-dtor flag.
2137         (finish_struct_1): Use accessible_nvdtor_p.
2139 2014-04-01  Jason Merrill  <jason@redhat.com>
2141         * pt.c (process_partial_specialization): Say "not deducible"
2142         rather than "not used".  Use inform.
2144         PR c++/60374
2145         * pt.c (coerce_template_parms): Check that the pack expansion
2146         pattern works with the first matching parameter.
2148 2014-04-01  Fabien Chêne  <fabien@gcc.gnu.org>
2150         * init.c (perform_member_init): Homogenize uninitialized
2151         diagnostics.
2153 2014-04-01  Jason Merrill  <jason@redhat.com>
2155         PR c++/60708
2156         * call.c (build_array_conv): Call complete_type.
2158         PR c++/60713
2159         * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2160         (picflag_from_initializer): Return it.
2161         (process_init_constructor): Handle it.
2163         PR c++/60642
2164         * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2165         * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2166         * pt.c (get_template_info): Handle NAMESPACE_DECL.
2167         (most_general_template): Handle more kinds of template.
2168         * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2169         instantiations and specializations.
2171 2014-03-31  Patrick Palka  <patrick@parcs.ath.cx>
2173         PR c++/44859
2174         * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2175         COMPONENT_REFs and ARRAY_REFs sooner.
2177 2014-03-29  Adam Butcher  <adam@jessamine.co.uk>
2179         PR c++/60626
2180         * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2181         usage in non-functions with pushed scope.
2183 2014-03-28  Adam Butcher  <adam@jessamine.co.uk>
2185         PR c++/60573
2186         * name-lookup.h (cp_binding_level): New transient field defining_class_p
2187         to indicate whether a scope is in the process of defining a class.
2188         * semantics.c (begin_class_definition): Set defining_class_p.
2189         * name-lookup.c (leave_scope): Reset defining_class_p.
2190         * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2191         defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2192         unwinding to class-defining scope to handle the erroneous definition of
2193         a generic function of an arbitrarily nested class within an enclosing
2194         class.
2196 2014-03-26  Fabien Chêne  <fabien@gcc.gnu.org>
2198         PR c++/52369
2199         * method.c (walk_field_subobs): Improve the diagnostic
2200         locations for both REFERENCE_TYPEs and non-static const members.
2201         * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2202         instead of %qD to be consistent with the c++11 diagnostic.
2204 2014-03-25  Jason Merrill  <jason@redhat.com>
2206         PR c++/60566
2207         PR c++/58678
2208         * class.c (build_vtbl_initializer): Handle abstract dtors here.
2209         * search.c (get_pure_virtuals): Not here.
2211         PR c++/60375
2212         * parser.c (cp_parser_lambda_expression): Don't parse the body of
2213         a lambda in unevaluated context.
2215         PR c++/60628
2216         * decl.c (create_array_type_for_decl): Complain about array of auto.
2218 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
2220         PR c++/60331
2221         * semantics.c (potential_constant_expression_1): Handle
2222         DECL_EXPR.
2224 2014-03-24  Adam Butcher  <adam@jessamine.co.uk>
2226         PR c++/60627
2227         * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2228         introducing an implicit function template parameter within an explicit
2229         instantiation.
2231 2014-03-22  Jason Merrill  <jason@redhat.com>
2233         PR c++/60574
2234         * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2235         to error.
2237 2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
2239         PR c++/60384
2240         * name-lookup.c (push_class_level_binding_1): Check identifier_p
2241         on the name argument.
2243 2014-03-20  Jakub Jelinek  <jakub@redhat.com>
2245         PR c++/60572
2246         * init.c (build_zero_init_1): Ignore fields with error_mark_node
2247         type.
2249 2014-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
2251         PR c++/51474
2252         * call.c (build_new_method_call_1): Handle pure virtuals called by
2253         NSDMIs too.
2255 2014-03-17  Adam Butcher  <adam@jessamine.co.uk>
2257         PR c++/60390
2258         * parser.c (cp_parser_member_declaration): Don't allow
2259         finish_fully_implicit_template to consider friend declarations to be
2260         class member templates.
2261         (synthesize_implicit_template_parm): Handling winding back through class
2262         scope to the class being defined in order to inject a template argument
2263         list.
2265         PR c++/60391
2266         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2267         function scope as per cp_parser_skip_to_end_of_statement.
2269 2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
2271         PR c++/59571
2272         * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2274 2014-03-14  Jason Merrill  <jason@redhat.com>
2276         PR c++/60532
2277         PR c++/58678
2278         * search.c (get_pure_virtuals): Handle abstract dtor here.
2279         (dfs_get_pure_virtuals): Not here.
2281         PR c++/58678
2282         * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2283         abstract class as pure.
2285 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2287         PR c++/60383
2288         * pt.c (maybe_process_partial_specialization): Check return value
2289         of check_specialization_namespace.
2291 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2293         PR c++/60254
2294         * semantics.c (finish_static_assert): Call cxx_constant_value only
2295         if require_potential_rvalue_constant_expression returns true.
2297 2014-03-11  Paolo Carlini  <paolo.carlini@oracle.com>
2299         PR c++/60389
2300         * method.c (get_inherited_ctor): New.
2301         * cp-tree.h (get_inherited_ctor): Declare it.
2302         * semantics.c (is_valid_constexpr_fn): Use it.
2304 2014-03-10  Jason Merrill  <jason@redhat.com>
2306         PR c++/60367
2307         * call.c (convert_default_arg): Remove special handling for
2308         CONSTRUCTOR.
2310         PR c++/53492
2311         * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2312         when deciding whether to call push_template_decl for a member class.
2313         * pt.c (push_template_decl_real): Return after wrong levels error.
2315 2014-03-08  Adam Butcher  <adam@jessamine.co.uk>
2317         PR c++/60033
2318         * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2319         lambda, remove the lambda's own template argument list prior to fetching
2320         the specialization.
2322         PR c++/60393
2323         * parser.c (cp_parser_parameter_declaration_clause): Move generic
2324         function template unwinding on error into a more general location, ...
2325         (cp_parser_skip_to_end_of_statement): ... here.
2327 2014-03-07  Jason Merrill  <jason@redhat.com>
2329         * Make-lang.in (check_g++_parallelize): Split dg.exp.
2331         * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2332         we're in a trailing return type.
2334         * typeck.c (comp_template_parms_position): 'auto' and
2335         'decltype(auto)' are different from real template parms.
2337         * parser.c (cp_parser_using_declaration): Consume the semicolon
2338         after bare parameter pack error.
2340         * cp-tree.h (REF_PARENTHESIZED_P): New.
2341         * semantics.c (force_paren_expr): Set it.
2342         * pt.c (do_auto_deduction): Check it.
2343         (tsubst) [COMPONENT_REF]: Copy it.
2344         * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2346         * decl.c (create_array_type_for_decl): Only warn about invalid
2347         C++1y VLA if flag_iso or warn_vla>0.
2348         (grokdeclarator): Likewise.
2349         * pt.c (tsubst): Likewise.
2350         * semantics.c (finish_decltype_type): Likewise.
2351         * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2352         (cp_build_addr_expr_1): Likewise.
2353         * init.c (build_new_1): Improve diagnostics.
2355 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2357         PR c++/58609
2358         * decl.c (check_initializer): Return NULL_TREE after error;
2359         consistently use inform.
2361 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2363         * decl.c (check_initializer): Remove dead code.
2365 2014-03-06  Marek Polacek  <polacek@redhat.com>
2367         PR c/60197
2368         * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2369         of checking tree code.
2371 2014-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2373         * parser.c (cp_lexer_set_source_position): New.
2374         (cp_parser_mem_initializer): Use it.
2375         (cp_parser_postfix_open_square_expression): Likewise.
2376         (cp_parser_parenthesized_expression_list): Likewise.
2377         (cp_parser_new_initializer): Likewise.
2378         (cp_parser_jump_statement): Likewise.
2379         (cp_parser_initializer): Likewise.
2380         (cp_parser_functional_cast): Likewise.
2382 2014-03-05  Jason Merrill  <jason@redhat.com>
2384         PR c++/60409
2385         * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2386         dependent expression.
2388         PR c++/60361
2389         * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2390         if re-parsing might succeed.
2391         * semantics.c (finish_id_expression): Use of a parameter outside
2392         the function body is a parse error.
2394         * parser.c (cp_parser_mem_initializer): Set input_location
2395         properly for init-list warning.
2396         (cp_parser_postfix_open_square_expression): Likewise.
2397         (cp_parser_parenthesized_expression_list): Likewise.
2398         (cp_parser_new_initializer): Likewise.
2399         (cp_parser_jump_statement): Likewise.
2400         (cp_parser_initializer): Likewise.
2401         (cp_parser_functional_cast): Likewise.
2403 2014-03-04  Jason Merrill  <jason@redhat.com>
2405         PR c++/60417
2406         * typeck2.c (process_init_constructor_record): Set
2407         CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2409         PR c++/60415
2410         PR c++/54359
2411         * parser.c (cp_parser_direct_declarator): Set declarator to
2412         cp_error_declarator on invalid qualified-id.
2414 2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
2416         PR c++/60376
2417         * parser.c (cp_parser_using_declaration): Early return when
2418         cp_parser_nested_name_specifier errors out.
2420 2014-03-01  Adam Butcher  <adam@jessamine.co.uk>
2422         PR c++/60377
2423         * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2424         function scope on parse error in function parameter list.
2426 2014-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
2428         * method.c (implicitly_declare_fn): Remove redundant
2429         DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2430         * semantics.c (is_instantiation_of_constexpr): Likewise.
2431         * error.c (dump_function_decl): Likewise.
2433 2014-03-01  Jason Merrill  <jason@redhat.com>
2435         PR c++/60379
2436         * semantics.c (begin_maybe_infinite_loop): Use
2437         fold_non_dependent_expr_sfinae.
2439 2014-02-28  Jason Merrill  <jason@redhat.com>
2441         PR c++/58845
2442         * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2444 2014-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
2446         PR c++/58610
2447         * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2448         * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2449         * lambda.c (maybe_add_lambda_conv_op): Likewise.
2451 2014-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
2453         PR c++/60253
2454         * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2455         error_at.
2457 2014-02-27  Jason Merrill  <jason@redhat.com>
2459         PR c++/60353
2460         PR c++/55877
2461         * decl2.c (tentative_decl_linkage): Don't mess with functions that
2462         are not yet defined.
2464 2014-02-26  Jason Merrill  <jason@redhat.com>
2466         PR c++/60347
2467         PR lto/53808
2468         * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2469         * init.c (build_vtbl_address): Do it here.
2471         PR c++/59231
2472         PR c++/11586
2473         PR c++/14710
2474         PR c++/57132
2475         * pt.c (struct warning_sentinel): New.
2476         (tsubst_copy_and_build): Use it instead of
2477         c_inhibit_evaluation_warnings.
2478         * typeck.c (maybe_warn_about_useless_cast): Remove
2479         c_inhibit_evaluation_warnings check.
2481         PR c++/54440
2482         * pt.c (get_template_parm_index): New.
2483         (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2484         (process_template_parm): Allow bare packs in template template
2485         parm template parms.
2486         (coerce_template_parameter_pack): Handle fixed template template
2487         parm packs and fixed packs not at the end of the parm list.
2488         (coerce_template_parms): Handle template parm packs not at the end
2489         of the parm list.
2490         (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2492         PR c++/60182
2493         * pt.c (unify): Ignore alias templates when deducing a template
2494         template parameter.
2496         PR c++/60345
2497         Revert:
2498         DR 1571
2499         * call.c (reference_binding): Recurse on user-defined conversion.
2500         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2502 2014-02-25  Jason Merrill  <jason@redhat.com>
2504         DR 1571
2505         * call.c (reference_binding): Recurse on user-defined conversion.
2506         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2508         * call.c (print_conversion_rejection): Handle n_arg of -2.
2509         (build_user_type_conversion_1): Pass it.
2511         PR c++/55877
2512         * decl2.c (no_linkage_error): Handle C++98 semantics.
2513         (reset_type_linkage): Move from decl.c.
2514         (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2515         (bt_reset_linkage_2, reset_decl_linkage): New.
2516         (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2517         (cp_write_global_declarations): Move condition into no_linkage_error.
2518         * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2519         * semantics.c (expand_or_defer_fn_1): Factor out
2520         tentative_decl_linkage.
2521         * cp-tree.h: Adjust.
2523         * decl2.c (finish_static_data_member_decl): Diagnose static data
2524         member in unnamed class.
2525         * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2527         PR lto/53808
2528         * class.c (clone_function_decl): Call note_vague_linkage_fn for
2529         defaulted virtual dtor.
2531         DR 1286
2532         PR c++/60328
2533         * pt.c (get_underlying_template): Fix equivalence calculation.
2535 2014-02-25  Adam Butcher  <adam@jessamine.co.uk>
2537         PR c++/60311
2538         * parser.c (function_being_declared_is_template_p): Return false when
2539         processing a template parameter list.
2540         (cp_parser_parameter_declaration_clause): Don't set
2541         auto_is_implicit_function_template_parm_p when processing a
2542         template parameter list.
2544         * parser.c (synthesize_implicit_template_parm): Inject new template
2545         argument list appropriately when a generic member function
2546         of a class template is declared out-of-line.
2548         PR c++/60065
2549         * parser.c (cp_parser_direct_declarator): Don't save and
2550         restore num_template_parameter_lists around call to
2551         cp_parser_parameter_declaration_list.
2552         (function_being_declared_is_template_p): New predicate.
2553         (cp_parser_parameter_declaration_list): Use
2554         function_being_declared_is_template_p as predicate for
2555         inspecting current function template parameter list length
2556         rather than num_template_parameter_lists.
2558 2014-02-24  Jason Merrill  <jason@redhat.com>
2560         PR c++/60146
2561         * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
2562         DECL_EXPR initialize a non-class iterator.
2564         PR c++/60312
2565         * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
2567 2014-02-21  Jason Merrill  <jason@redhat.com>
2569         PR c++/58170
2570         * parser.c (cp_parser_type_name): Always check dependency.
2571         (cp_parser_type_specifier_seq): Call
2572         cp_parser_parse_and_diagnose_invalid_type_name.
2574         PR c++/60108
2575         * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
2577         PR c++/60185
2578         * parser.c (cp_parser_default_argument): Clear
2579         current_class_ptr/current_class_ref like tsubst_default_argument.
2581         PR c++/60252
2582         * lambda.c (maybe_resolve_dummy): Check lambda_function rather
2583         than current_binding_level.
2585         PR c++/60186
2586         * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
2588         PR c++/60187
2589         * parser.c (cp_parser_enum_specifier): Call
2590         check_for_bare_parameter_packs.
2592         PR c++/59347
2593         * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
2594         erroneous typedef.
2596         PR c++/60241
2597         * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
2598         of the partial instantiation, not the most general template.
2599         (maybe_process_partial_specialization): Reassign everything on
2600         that list.
2602         PR c++/60216
2603         * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
2604         (check_explicit_specialization): Don't clone.
2606         PR c++/60219
2607         * pt.c (coerce_template_parms): Bail if argument packing fails.
2609         PR c++/60224
2610         * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
2611         Don't get confused by a CONSTRUCTOR that already has a type.
2613         PR c++/60227
2614         * call.c (build_array_conv): Don't crash on VLA.
2616         PR c++/60248
2617         * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
2619         PR c++/60252
2620         * lambda.c (maybe_resolve_dummy): Don't try to capture this
2621         in declaration context.
2623         DR 1591
2624         PR c++/60051
2625         * pt.c (unify): Only unify if deducible.  Handle 0-length list.
2627         PR c++/60250
2628         * parser.c (cp_parser_direct_declarator): Don't wrap a
2629         type-dependent expression in a NOP_EXPR.
2631         PR c++/60251
2632         * lambda.c (is_normal_capture_proxy): Handle VLA capture.
2634         PR c++/60167
2635         PR c++/60222
2636         PR c++/58606
2637         * parser.c (cp_parser_template_argument): Restore dereference.
2638         * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
2639         (process_partial_specialization): Handle deref.
2640         (unify): Likewise.
2642 2014-02-21  Adam Butcher  <adam@jessamine.co.uk>
2644         PR c++/60052
2645         PR c++/60053
2646         * parser.c (cp_parser_parameter_declaration_list): Correctly reset
2647         implicit_template_scope upon leaving an out-of-line generic member
2648         function definition.
2650 2014-02-20  Kai Tietz  <ktietz@redhat.com>
2652         PR c++/58873
2653         * parser.c (cp_parser_functional_cast): Treat NULL_TREE
2654         valued type argument as error_mark_node.
2656         PR c++/58835
2657         * semantics.c (finish_fname): Handle error_mark_node.
2659 2014-02-19  Jason Merrill  <jason@redhat.com>
2661         PR c++/60046
2662         * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
2663         spec from template context.
2665 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
2667         PR debug/56563
2668         * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
2669         FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
2671         PR c++/60267
2672         * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
2674 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
2676         PR c++/60225
2677         * semantics.c (ensure_literal_type_for_constexpr_object): Use
2678         strip_array_types.
2680 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
2682         PR c++/60215
2683         * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
2684         During error recovery allow_non_constant may be false.
2686 2014-02-18  Adam Butcher  <adam@jessamine.co.uk>
2688         PR c++/60190
2689         * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
2690         scope whenever a template parameter list has been started, independent
2691         of whether the function call operator was well-formed or not.
2693         PR c++/60064
2694         * parser.c (cp_parser_member_declaration): Pop fully implicit template
2695         scope for generic friend declarations as well as for non-friends.
2697 2014-02-12  Paolo Carlini  <paolo.carlini@oracle.com>
2699         PR c++/60047
2700         * method.c (implicitly_declare_fn): A constructor of a class with
2701         virtual base classes isn't constexpr (7.1.5p4).
2703 2014-02-05  Jan Hubicka  <hubicka@ucw.cz
2705         * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
2707 2014-02-05  Jakub Jelinek  <jakub@redhat.com>
2709         PR c++/58703
2710         * parser.c (cp_parser_omp_declare_reduction): Save and free
2711         declarator_obstack.
2713 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
2715         PR c++/53017
2716         PR c++/59211
2717         * tree.c (handle_init_priority_attribute): Call default_conversion on
2718         the attribute argument.
2720 2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
2722         PR c++/58871
2723         * method.c (synthesized_method_walk): If vbases is non-null but
2724         is_empty is true, likewise don't worry about the virtual bases.
2726 2014-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
2728         PR c++/51219
2729         * typeck2.c (process_init_constructor_record): Just skip unnamed
2730         bit-fields.
2732 2014-01-31  Jason Merrill  <jason@redhat.com>
2734         PR c++/59469
2735         * pt.c (mark_decl_instantiated): Call mark_needed.
2737         PR c++/58672
2738         * decl2.c (handle_tls_init): Handle null init fn.
2740         PR c++/55800
2741         * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
2743 2014-01-31  Paolo Carlini  <paolo.carlini@oracle.com>
2745         PR c++/59082
2746         * class.c (build_vfield_ref): Early return error_mark_node if
2747         TYPE_VFIELD (type) is null.
2748         (build_base_path): Check return value of build_vfield_ref.
2750 2014-01-31  Jason Merrill  <jason@redhat.com>
2752         PR c++/59646
2753         * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
2754         [ck_list]: Check for error_mark_node.
2755         (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
2757         PR c++/57043
2758         * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
2759         during partial ordering.
2761 2014-01-31  Marek Polacek  <polacek@redhat.com>
2763         PR c/59963
2764         * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
2766 2014-01-30  Jason Merrill  <jason@redhat.com>
2768         PR c++/57899
2769         * cp-tree.h (struct saved_scope): Add x_local_specializations.
2770         (local_specializations): New macro.
2771         * pt.c (local_specializations): Remove variable.
2773 2014-01-30  Richard Sandiford  <rdsandiford@googlemail.com>
2775         PR c++/58708
2776         * parser.c (make_string_pack): Use double_int::from_buffer.
2778 2014-01-30  Marek Polacek  <polacek@redhat.com>
2780         PR c/59940
2781         * typeck.c (build_ptrmemfunc1): Call convert_and_check with
2782         input_location.
2783         * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
2784         with input_location.
2785         * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
2786         loc parameter.
2788 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2790         PR c++/58843
2791         * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
2793 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2795         PR c++/58649
2796         * pt.c (lookup_template_class_1): Check start_enum return value
2797         for error_mark_node.
2799 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2801         * decl.c (duplicate_decls, typename_hash, typename_compare):
2802         Use TYPE_IDENTIFIER.
2803         * error.c (dump_type): Likewise.
2804         * mangle.c (dump_substitution_candidates): Likewise.
2806 2014-01-30  Jason Merrill  <jason@redhat.com>
2808         PR c++/59633
2809         * decl2.c (attributes_naming_typedef_ok): New.
2810         * cp-tree.h: Declare it.
2811         * decl.c (grokdeclarator): Check it.
2812         * tree.c (no_linkage_check): Handle VECTOR_TYPE.
2814 2014-01-29  Jason Merrill  <jason@redhat.com>
2816         PR c++/59707
2817         * call.c (add_builtin_candidate): Catch dependent types.
2819         PR c++/59989
2820         * pt.c (expand_template_argument_pack): Correct
2821         non_default_args_count calculation.
2823         PR c++/58466
2824         * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
2826         PR c++/59956
2827         * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
2828         have a friend template in a class template.
2829         * pt.c (tsubst_friend_function): Look through it.
2830         (push_template_decl_real): A friend member template is
2831         primary.
2833 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2835         PR c++/58846
2836         * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
2837         == error_mark_node.
2839 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2841         PR c++/58674
2842         * pt.c (instantiate_template_1): Check for error_mark_node the second
2843         argument too.
2845 2014-01-29  Jason Merrill  <jason@redhat.com>
2847         PR c++/59916
2848         * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
2849         cdtor_returns_this case.
2851         PR c++/59315
2852         * decl.c (cxx_maybe_build_cleanup): Call mark_used.
2854 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2856         PR c++/58702
2857         * semantics.c (finish_omp_reduction_clause): Check type for
2858         error_mark_node.
2860 2014-01-28  Jason Merrill  <jason@redhat.com>
2862         PR c++/59791
2863         * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
2864         (tsubst_copy): Use it if lookup fails.
2866         PR c++/59818
2867         * pt.c (tsubst_function_type): Make sure we keep the same function
2868         quals.
2870         PR c++/58701
2871         * semantics.c (build_anon_member_initialization): Stop walking
2872         when we run out of COMPONENT_REFs.
2874         PR c++/58632
2875         * decl.c (lookup_and_check_tag): Ignore template parameters if
2876         scope == ts_current.
2877         * pt.c (check_template_shadow): Don't complain about the injected
2878         class name.
2880         * decl.c (duplicate_decls): Tweak.
2882         PR c++/53756
2883         * mangle.c (write_unqualified_name): Handle operator auto.
2885 2014-01-27  Jason Merrill  <jason@redhat.com>
2887         PR c++/59823
2888         Core DR 1138
2889         * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
2890         list-initialization.  A conversion to rvalue ref that involves
2891         an lvalue-rvalue conversion is bad.
2892         (convert_like_real): Give helpful error message.
2894         PR c++/54652
2895         * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
2897         PR c++/58504
2898         * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
2899         types.
2901         PR c++/58606
2902         * pt.c (template_parm_to_arg): Call convert_from_reference.
2903         (tsubst_template_arg): Don't strip reference refs.
2905         PR c++/58639
2906         * call.c (build_aggr_conv): Reject value-initialization of reference.
2908         PR c++/58812
2909         PR c++/58651
2910         * call.c (convert_like_real): Give helpful error about excess braces
2911         for ck_rvalue of scalar type.
2913         Core DR 1288
2914         * call.c (reference_binding): Only elide braces if the single
2915         element is reference-related.
2917         PR c++/58814
2918         * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
2919         stabilizing.
2921         PR c++/58837
2922         * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
2923         FUNCTION_DECL.
2925         PR c++/59097
2926         * decl.c (compute_array_index_type): Don't call
2927         maybe_constant_value for a non-integral expression.
2929 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2931         * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
2932         flag_cilkplus.
2933         * cp-gimplify.c (cp_genericize): Likewise.
2934         * decl.c (grokfndecl): Likewise.
2935         * parser.c (cp_parser_postfix_expression): Likewise.
2936         (cp_parser_postfix_open_square_expression): Likewise.
2937         (cp_parser_direct_declarator): Likewise.
2938         (is_cilkplus_vector_p): Likewise.
2939         (cp_parser_omp_clause_name): Likewise.
2940         (cp_parser_omp_all_clauses): Likewise.
2941         * pt.c (apply_late_template_attributes): Likewise.
2942         * typeck.c (cp_build_array_ref): Likewise.
2943         (cp_build_compound_expr): Likewise.
2944         (check_return_expr): Likewise.
2946 2014-01-24  Jason Merrill  <jason@redhat.com>
2948         PR c++/58550
2949         * decl.c (grokdeclarator): Turn pedwarn about auto return type in
2950         c++11 into error.
2952         PR c++/59886
2953         PR c++/59659
2954         * typeck2.c (process_init_constructor_array): Don't create
2955         RANGE_EXPR yet.
2957 2014-01-24  Jakub Jelinek  <jakub@redhat.com>
2959         * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
2960         handling for RANGE_ARRAY case.
2962 2014-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
2964         PR c++/57524
2965         * name-lookup.c (push_using_directive): Use timevar_cond_start.
2967 2014-01-23  Marek Polacek  <polacek@redhat.com>
2969         PR c/59846
2970         * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
2972 2014-01-23  Marek Polacek  <polacek@redhat.com>
2974         PR c/58346
2975         * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2976         an empty aggregate.
2978 2014-01-23  Jason Merrill  <jason@redhat.com>
2980         PR c++/55189
2981         * cp-tree.h (struct language_function): Add infinite_loop and
2982         infinite_loops.
2983         (current_function_infinite_loop): New.
2984         * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
2985         (break_maybe_infinite_loop): New.
2986         (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
2987         (finish_do_stmt, finish_for_cond, finish_for_stmt)
2988         (begin_range_for_stmt): Use them.
2989         * decl.c (finish_function): Don't warn about missing return
2990         if current_function_infinite_loop.
2991         * pt.c (instantiate_decl): Copy current_function_infinite_loop.
2992         * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
2994         * call.c (build_op_delete_call): Use make_tree_vector and
2995         release_tree_vector.
2997 2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
2999         PR c++/58980
3000         * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3001         nested_name_specifier.
3003 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3005         * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3006         see if there is an attribute after function decl.  If so, then
3007         parse them now.
3008         (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3009         enabled function late parsing.
3010         (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3011         attribute for a SIMD-enabled function.
3012         (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3013         the function is used by SIMD-enabled function (indicated by NULL
3014         pragma token).   Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3015         PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3016         (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3017         vectorlength clause in SIMD-enabled function and #pragma SIMD's
3018         vectorlength clause.  Added a new bool parameter to differentiate
3019         between the two.
3020         (cp_parser_cilk_simd_fn_vector_attrs): New function.
3021         (is_cilkplus_vector_p): Likewise.
3022         (cp_parser_late_parsing_elem_fn_info): Likewise.
3023         (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3024         and "vectorlength" clauses when Cilk Plus is enabled.
3025         (cp_parser_omp_clause_linear): Added a new parameter of type bool
3026         and emit a sorry message when step size is a parameter.
3027         * parser.h (cp_parser::cilk_simd_fn_info): New field.
3028         * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3029         flag_openmp.
3030         * pt.c (apply_late_template_attributes): Likewise.
3032 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
3034         PR middle-end/58809
3035         * semantics.c (finish_omp_reduction_clause): Reject
3036         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3038 2014-01-22  Ville Voutilainen  <ville.voutilainen@gmail.com>
3040         PR c++/59482
3041         * parser.c (cp_parser_class_head): Push the class before parsing
3042         the base-clause, pop after it.
3044 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
3046         * decl2.c (cpp_check): Revert prototype change.
3048 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
3050         PR c++/59270
3051         PR c++/58811
3052         * init.c (build_value_init_noctor): Don't pass error_mark_node to
3053         build_value_init.
3055 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
3057         PR c++/59269
3058         * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3059         only when errorcount == 0.
3061 2014-01-17  Marek Polacek  <polacek@redhat.com>
3063         PR c++/59838
3064         * cvt.c (ocp_convert): Don't segfault on non-existing
3065         ENUM_UNDERLYING_TYPE.
3067 2014-01-16  Jason Merrill  <jason@redhat.com>
3069         PR c++/59821
3070         * tree.c (bot_manip): Update the location of builtin_LINE and
3071         builtin_FILE calls.
3073 2014-01-14  Jason Merrill  <jason@redhat.com>
3075         PR c++/59659
3076         * typeck2.c (massage_init_elt): New.
3077         (process_init_constructor_record)
3078         (process_init_constructor_union): Use it.
3079         (process_init_constructor_array): Use it.  Use RANGE_EXPR.
3080         (split_nonconstant_init_1): Handle it.
3081         * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3083 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3085         PR c++/59631
3086         * parser.c (cp_parser_postfix_expression): Added a new if-statement
3087         and replaced an existing if-statement with else-if statement.
3088         Changed an existing error message wording to match the one from the C
3089         parser.
3091 2014-01-08  Jason Merrill  <jason@redhat.com>
3093         PR c++/59614
3094         * class.c (abi_tag_data): Add tags field.
3095         (check_abi_tags): Initialize it.
3096         (find_abi_tags_r): Support collecting missing tags.
3097         (mark_type_abi_tags): Don't look at template args.
3098         (inherit_targ_abi_tags): New.
3099         (check_bases_and_members): Use it.
3100         * cp-tree.h (ABI_TAG_IMPLICIT): New.
3101         * mangle.c (write_abi_tags): Check it.
3103 2014-01-07  Jason Merrill  <jason@redhat.com>
3105         PR c++/58856
3106         * pt.c (num_innermost_template_parms): New.
3107         (get_underlying_template): Use it.
3109         PR c++/58965
3110         * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3112 2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
3114         * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3115         the letter of 20.11.6 about Base and Derived naming the same
3116         class type modulo cv-qualifiers.
3118 2014-01-06  Adam Butcher  <adam@jessamine.co.uk>
3120         PR c++/59635
3121         * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3122         function as unimplemented for generic lambdas with varargs.
3124         PR c++/59636
3125         * parser.c (cp_parser_template_parameter): Early out with
3126         error_mark_node if parameter declaration was not parsed.
3128         PR c++/59629
3129         * parser.c (cp_parser_lambda_expression): Save/reset/restore
3130         auto_is_implicit_function_template_parm_p around lambda body.
3132         PR c++/59638
3133         * parser.c (cp_parser_init_declarator): Undo fully implicit
3134         template parameter list when declarator is not a function.
3136 2014-01-03  Marc Glisse  <marc.glisse@inria.fr>
3138         PR c++/58950
3139         * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3141 2014-01-03  Tobias Burnus  <burnus@net-b.de>
3143         PR c++/58567
3144         * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3146 2014-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
3148         Core DR 1442
3149         PR c++/59165
3150         * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3151         as include_std to perform_koenig_lookup.
3152         (cp_parser_postfix_expression): Adjust.
3153         * pt.c (tsubst_copy_and_build): Likewise.
3154         * semantics.c (perform_koenig_lookup): Remove bool parameter.
3155         (omp_reduction_lookup): Adjust.
3156         * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3157         (lookup_arg_dependent): Likewise.
3158         (lookup_function_nonclass): Adjust.
3159         * name-lookup.h: Adjust declaration.
3160         * cp-tree.h: Likewise.
3162 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3164         PR c++/59087
3165         * parser.c (cp_parser_userdef_numeric_literal): Mention
3166         -fext-numeric-literals in the message.
3168 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3170         PR c++/59641
3171         * call.c (build_conditional_expr_1): Check the return value of
3172         force_rvalue.
3174 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3176         * call.c (convert_like_real): Check complain.
3178 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
3180         PR c++/59378
3181         * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3182         in templates.
3184 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3186         Update copyright years
3188 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
3190         * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3191         the standard form for the copyright notice.
3193 Copyright (C) 2014 Free Software Foundation, Inc.
3195 Copying and distribution of this file, with or without modification,
3196 are permitted in any medium without royalty provided the copyright
3197 notice and this notice are preserved.