PR c++/65209
[official-gcc.git] / gcc / cp / ChangeLog
blobbdea7d5737e48112300a57c9ac5597abe4ed49d5
1 2015-03-04  Jason Merrill  <jason@redhat.com>
3         PR c++/65209
4         PR c++/65309
5         * decl2.c (constrain_visibility_for_template): Handle reference
6         arguments.
8 2015-02-25  Jason Merrill  <jason@redhat.com>
10         PR c++/62255
11         * pt.c (instantiate_decl): Handle recursive instantiation of
12         static data member.
14         * decl.c (begin_destructor_body): Condition clobber on
15         -flifetime-dse.
17 2015-02-13  Jason Merrill  <jason@redhat.com>
19         PR c++/62017
20         * decl.c (begin_destructor_body): Only clobber the as-base part of
21         *this.
23 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
25         Backported from mainline
26         2015-02-04  Jakub Jelinek  <jakub@redhat.com>
28         PR c/64824
29         PR c/64868
30         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
32 2015-02-04  Ville Voutilainen  <ville.voutilainen@gmail.com>
34         PR c++/64901
35         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
36         DECL_OVERRIDE_P.
38 2015-01-29  Jason Merrill  <jason@redhat.com>
40         PR c++/64521
41         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
42         point.
44 2015-01-13  Jason Merrill  <jason@redhat.com>
46         PR c++/64514
47         * pt.c (coerce_template_parameter_pack): Return NULL for a
48         zero-length fixed parameter pack with a pack expansion arg.
50 2015-01-07  Jason Merrill  <jason@redhat.com>
52         PR c++/64487
53         * semantics.c (finish_offsetof): Handle templates here.
54         * parser.c (cp_parser_builtin_offsetof): Not here.
56         PR c++/64352
57         * pt.c (tsubst_copy_and_build): Pass complain to mark_used.
59         PR c++/64251
60         * decl2.c (mark_used): Don't mark if in_template_function.
62         PR c++/64297
63         * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
65         PR c++/64029
66         * decl.c (grok_reference_init): Complete array type.
68         PR c++/63657
69         PR c++/38958
70         * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
71         if the temporary has a non-trivial destructor.
72         * decl.c (poplevel): Don't look through references.
74         PR c++/63658
75         * pt.c (convert_nontype_argument): Call convert_from_reference.
76         (check_instantiated_arg): Don't be confused by reference refs.
77         (unify): Look through reference refs on the arg, too.
78         * mangle.c (write_template_arg): Look through reference refs.
80 2014-12-19  Paolo Carlini  <paolo.carlini@oracle.com>
82         PR c++/60955
83         * pt.c (struct warning_sentinel): Move it...
84         * cp-tree.h: ... here.
85         * semantics.c (force_paren_expr): Use it.
87 2014-11-21  Jason Merrill  <jason@redhat.com>
89         PR c++/63849
90         * mangle.c (decl_mangling_context): Use template_type_parameter_p.
92 2014-11-11  Paolo Carlini  <paolo.carlini@oracle.com>
94         PR c++/63265
95         * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
96         constant the condition.
98 2014-10-30  Release Manager
100         * GCC 4.9.2 released.
102 2014-10-15  Jason Merrill  <jason@redhat.com>
104         PR c++/63455
105         Revert:
106         * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
107         committed to this tentative parse.
109 2014-10-09  Jason Merrill  <jason@redhat.com>
111         PR c++/63415
112         * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
113         (iterative_hash_template_arg): Likewise.
115         PR c++/63437
116         * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
117         * semantics.c (force_paren_expr): And set it.
118         * typeck.c (check_return_expr): And handle it.
120 2014-10-08  Jason Merrill  <jason@redhat.com>
122         PR c++/63405
123         * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
125 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
127         PR c++/63249
128         * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
129         on low_bound and length.
131 2014-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
133         PR c++/62219
134         * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
136 2014-09-19  Jason Merrill  <jason@redhat.com>
138         PR c++/61465
139         * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
140         after pulling out an element from a CONSTRUCTOR.
142 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
144         PR c++/63248
145         * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
146         on type of type dependent expressions, and don't call it if
147         handle_omp_array_sections has kept TREE_LIST because something
148         was type dependent.
149         * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
150         Use keep_next_level, begin_omp_structured_block and
151         finish_omp_structured_block instead of push_stmt_list and
152         pop_stmt_list.
154 2014-09-10  Jason Merrill  <jason@redhat.com>
156         PR c++/63139
157         * pt.c (tsubst_pack_expansion): Simplify substitution into T....
159 2014-09-09  Jason Merrill  <jason@redhat.com>
161         PR lto/53808
162         PR c++/61659
163         * decl2.c (note_comdat_fn): New.
164         (set_comdat): New.
165         (cp_write_global_declarations): Call set_comdat.
166         * method.c (implicitly_declare_fn): Call note_comdat_fn.
167         * pt.c (tsubst_decl) [FUNCTION_DECL]: Likewise.
168         * decl2.c (mark_needed): Mark clones.
169         (import_export_decl): Not here.
171         PR c++/61214
172         PR c++/62224
173         * decl2.c (decl_needed_p): Revert virtual functions change.
175 2014-09-05  Jason Merrill  <jason@redhat.com>
177         PR c++/62659
178         * semantics.c (potential_constant_expression_1): Handle un-folded
179         pointer to member constants.
181 2014-08-26  Jason Merrill  <jason@redhat.com>
183         PR c++/58624
184         * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
185         * semantics.c (finish_id_expression): Don't call TLS wrapper in a
186         template.
188 2014-08-25  Jason Merrill  <jason@redhat.com>
190         PR c++/62129
191         * class.c (outermost_open_class): New.
192         * cp-tree.h: Declare it.
193         * decl.c (maybe_register_incomplete_var): Use it.
194         (complete_vars): Handle any constant variable.
195         * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
197 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
199         PR other/62008
200         * cp-array-notation.c (build_array_notation_ref): Added correct
201         handling of case with incorrect array.
203 2014-08-19  Jason Merrill  <jason@redhat.com>
205         PR c++/61214
206         PR tree-optimization/62091
207         * decl2.c (decl_needed_p): Return true for virtual functions when
208         devirtualizing.
210         Backport:
211         PR c++/61566
212         * pt.c (instantiate_class_template_1): Ignore lambda on
213         CLASSTYPE_DECL_LIST.
214         (push_template_decl_real): A lambda is not primary.
215         * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
216         currently in a function and the lambda living in a function.
218         Backport:
219         PR c++/60417
220         * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
221         init-list for trailing elements.
222         * typeck2.c (process_init_constructor_array): Likewise.
224 2014-08-07  Jason Merrill  <jason@redhat.com>
226         PR c++/61959
227         * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
229         PR c++/61994
230         * init.c (build_vec_init): Leave atype an ARRAY_TYPE
231         if we're just returning an INIT_EXPR.
233         PR c++/60872
234         * call.c (standard_conversion): Don't try to apply restrict to void.
236         PR c++/58714
237         * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
239 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
241         * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
242         in error output.
244 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
246         PR other/61963
247         * parser.c (cp_parser_array_notation): Added check for array_type.
249 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
251         PR middle-end/61455
252         * cp-array-notation.c (expand_array_notation_exprs): Handling of
253         DECL_EXPR improved. Changed handling for INIT_EXPR.
255 2014-07-16  Release Manager
257         * GCC 4.9.1 released.
259 2014-07-13  Jason Merrill  <jason@redhat.com>
261         PR c++/58636
262         * call.c (build_list_conv): Don't try to build a list of references.
264 2014-07-10  Jason Merrill  <jason@redhat.com>
266         PR c++/61661
267         * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
269 2014-07-01  Paul Pluzhnikov  <ppluzhnikov@google.com>
271         PR c++/58753
272         PR c++/58930
273         PR c++/58704
275         Backported from mainline
276         2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
278         * typeck2.c (digest_nsdmi_init): New.
279         * parser.c (cp_parser_late_parse_one_default_arg): Use it.
280         * init.c (get_nsdmi): Likewise.
281         * cp-tree.h (digest_nsdmi_init): Declare.
283 2014-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
285         PR c++/58781
286         PR c++/60249
287         PR c++/59867
288         * parser.c (cp_parser_userdef_string_literal()): Take a tree
289         not a cp_token*. (cp_parser_string_literal(): Don't hack
290         the token stream!
292 2014-06-30  Jason Merrill  <jason@redhat.com>
294         PR c++/61647
295         * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
297         PR c++/61566
298         * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
300 2014-06-30  Jakub Jelinek  <jakub@redhat.com>
302         Backported from mainline
303         2014-06-25  Jakub Jelinek  <jakub@redhat.com>
305         * semantics.c (finish_omp_clauses): Make sure
306         OMP_CLAUSE_LINEAR_STEP has correct type.
308         2014-06-18  Jakub Jelinek  <jakub@redhat.com>
310         * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
311         argument.
312         * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
314 2014-06-30  Jason Merrill  <jason@redhat.com>
316         PR c++/61539
317         * pt.c (unify_one_argument): Type/expression mismatch just causes
318         deduction failure.
320         DR 1030
321         PR c++/51253
322         PR c++/61382
323         * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
324         * call.c (struct z_candidate): Add flags field.
325         (add_candidate): Add flags parm.
326         (add_function_candidate, add_conv_candidate, build_builtin_candidate)
327         (add_template_candidate_real): Pass it.
328         (build_over_call): Set CALL_EXPR_LIST_INIT_P.
329         * tree.c (build_aggr_init_expr): Copy it.
330         * semantics.c (simplify_aggr_init_expr): Copy it.
331         * cp-gimplify.c (cp_gimplify_expr): Handle it.
333         PR c++/61488
334         * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
336         PR c++/61500
337         * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
339 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
341         PR middle-end/57541
342         * cp-array-notation.c (expand_sec_reduce_builtin):
343         Check that bultin argument is correct.
344         * call.c (build_cxx_call): Check for 0 arguments in builtin call.
346 2014-06-27  Jason Merrill  <jason@redhat.com>
348         PR c++/61433
349         * error.c (dump_template_bindings): Don't tsubst in a clone.
351 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
353         PR c++/61614
354         * semantics.c (finish_compound_literal): Revert r204228.
356 2014-06-26  Adam Butcher  <adam@jessamine.co.uk>
358         PR c++/61537
359         * parser.c (cp_parser_elaborated_type_specifier): Only consider template
360         parameter lists outside of function parameter scope.
362 2014-06-25  Jason Merrill  <jason@redhat.com>
364         PR c++/61242
365         * call.c (build_aggr_conv): Ignore passed in flags.
366         (build_array_conv, build_complex_conv): Likewise.
368 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
370         * parser.c (cp_parser_omp_for_loop): For
371         #pragma omp parallel for simd move lastprivate clause from parallel
372         to for rather than simd.
374 2014-06-20  Jason Merrill  <jason@redhat.com>
376         PR c++/59296
377         * call.c (add_function_candidate): Avoid special 'this' handling
378         if we have a ref-qualifier.
380         PR c++/61556
381         * call.c (build_over_call): Call build_this in template path.
383 2014-06-19  Jason Merrill  <jason@redhat.com>
385         PR c++/59296
386         * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND
387         |LOOKUP_NO_TEMP_BIND for ref-qualifier handling.
389         PR c++/61507
390         * pt.c (resolve_overloaded_unification): Preserve
391         ARGUMENT_PACK_EXPLICIT_ARGS.
393 2014-06-18  Jason Merrill  <jason@redhat.com>
395         PR c++/60605
396         * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
398 2014-06-18  Siva Chandra Reddy  <sivachandra@google.com>
400         PR debug/57519
401         * class.c (handle_using_decl): Pass the correct scope to
402         cp_emit_debug_info_for_using.
404 2014-06-09  Jason Merrill  <jason@redhat.com>
406         PR c++/61343
407         * decl.c (check_initializer): Maybe clear
408         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
410 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
412         PR c/58942
413         * c-c++-common/cilk-plus/AN/pr58942.c: Check for correct handling of
414         the case with a pointer.
416 2014-06-02  Jason Merrill  <jason@redhat.com>
418         PR c++/61134
419         * pt.c (pack_deducible_p): Handle canonicalization.
421 2014-05-21  Igor Zamyatin  <igor.zamyatin@intel.com>
423         PR c/60189
424         * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
425         from here to...
426         (cp_parser_statement): ...here. Make sure only semicolon can go after
427         Cilk_sync.
429 2014-05-13  Jason Merrill  <jason@redhat.com>
431         PR c++/61151
432         * lambda.c (is_this): Allow capture proxies too.
434         DR 5
435         PR c++/60019
436         * call.c (build_user_type_conversion_1): The copy-init temporary
437         is cv-unqualified.
439 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
441         PR c++/61083
442         * pt.c (convert_nontype_argument): Protect all the error calls
443         with complain & tf_error.
445 2014-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
447         PR c++/60999
448         * pt.c (maybe_begin_member_template_processing): Use
449         uses_template_parms.
451 2014-05-02  Jason Merrill  <jason@redhat.com>
453         PR c++/60992
454         * lambda.c (lambda_capture_field_type): Wrap anything dependent
455         other than 'this' or a VLA.
456         (is_this): New.
457         * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
458         the operand was static or constant.
460 2014-04-30  Jason Merrill  <jason@redhat.com>
462         PR c++/60980
463         * init.c (build_value_init): Don't try to call an array constructor.
465         PR c++/60951
466         * typeck2.c (massage_init_elt): Use maybe_constant_init.
468 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
470         * parser.c (cp_parser_omp_atomic): Allow seq_cst before
471         atomic-clause, allow comma in between atomic-clause and
472         seq_cst.
474 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
476         PR c/59073
477         * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
478         fails, don't set OM_PARALLEL_COMBINED and return NULL.
480 2014-04-22  Release Manager
482         * GCC 4.9.0 released.
484 2014-04-15  Jakub Jelinek  <jakub@redhat.com>
486         PR plugins/59335
487         * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
489 2014-04-10  Richard Biener  <rguenther@suse.de>
490             Jakub Jelinek  <jakub@redhat.com>
492         PR ipa/60761
493         * error.c (dump_decl) <case FUNCTION_DECL>: If
494         DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
495         recurse on DECL_ABSTRACT_ORIGIN instead of printing
496         <built-in>.
498 2014-04-09  Fabien Chêne  <fabien@gcc.gnu.org>
500         * pt.c (check_template_variable): Check for the return of pedwarn
501         before emitting a note.
502         * parser.c (cp_parser_lambda_introducer): Likewise.
504 2014-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
506         PR c++/59115
507         * pt.c (process_template_parm): For an invalid non-type parameter
508         only set TREE_TYPE to error_mark_node.
509         (push_inline_template_parms_recursive, comp_template_parms,
510         redeclare_class_template, coerce_template_template_parm,
511         coerce_template_template_parms, unify): Use error_operand_p.
513 2014-04-08  Nathan Sidwell  <nathan@codesourcery.com>
515         * class.c (check_bases_and_members): Warn about non-virtual dtors
516         in public bases only.  Check warn_ecpp before complaining about
517         non-polymorphic bases.
519 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
521         * decl.c (duplicate_decls): Check for the return of warning_at
522         before emitting a note.
523         (warn_misplaced_attr_for_class_type): Likewise.
524         (check_tag_decl): Likewise.
526 2014-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
528         PR c++/58207
529         * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
531 2014-04-04  Patrick Palka  <patrick@parcs.ath.cx>
533         PR c++/44613
534         * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
535         * decl.c (cp_finish_decl): Create a new BIND_EXPR before
536         instantiating a variable-sized type.
538         PR c++/21113
539         * decl.c (decl_jump_unsafe): Consider variably-modified decls.
541 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
543         * class.c (find_abi_tags_r): Check for the return of warning
544         before emitting a note.
545         (one_inherited_ctor): Likewise.
547 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
549         * decl.c (duplicate_decls): Check for the return of permerror
550         before emitting a note.
552 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
554         * class.c (accessible_nvdtor_p): New.
555         (check_bases): Don't check base destructor here ...
556         (check_bases_and_members): ... check them here.  Trigger on
557         Wnon-virtual-dtor flag.
558         (finish_struct_1): Use accessible_nvdtor_p.
560 2014-04-01  Jason Merrill  <jason@redhat.com>
562         * pt.c (process_partial_specialization): Say "not deducible"
563         rather than "not used".  Use inform.
565         PR c++/60374
566         * pt.c (coerce_template_parms): Check that the pack expansion
567         pattern works with the first matching parameter.
569 2014-04-01  Fabien Chêne  <fabien@gcc.gnu.org>
571         * init.c (perform_member_init): Homogenize uninitialized
572         diagnostics.
574 2014-04-01  Jason Merrill  <jason@redhat.com>
576         PR c++/60708
577         * call.c (build_array_conv): Call complete_type.
579         PR c++/60713
580         * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
581         (picflag_from_initializer): Return it.
582         (process_init_constructor): Handle it.
584         PR c++/60642
585         * decl2.c (is_late_template_attribute): Don't defer abi_tag.
586         * mangle.c (write_unqualified_name): Fix abi_tag on templates.
587         * pt.c (get_template_info): Handle NAMESPACE_DECL.
588         (most_general_template): Handle more kinds of template.
589         * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
590         instantiations and specializations.
592 2014-03-31  Patrick Palka  <patrick@parcs.ath.cx>
594         PR c++/44859
595         * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
596         COMPONENT_REFs and ARRAY_REFs sooner.
598 2014-03-29  Adam Butcher  <adam@jessamine.co.uk>
600         PR c++/60626
601         * parser.c (cp_parser_init_declarator): Handle erroneous generic type
602         usage in non-functions with pushed scope.
604 2014-03-28  Adam Butcher  <adam@jessamine.co.uk>
606         PR c++/60573
607         * name-lookup.h (cp_binding_level): New transient field defining_class_p
608         to indicate whether a scope is in the process of defining a class.
609         * semantics.c (begin_class_definition): Set defining_class_p.
610         * name-lookup.c (leave_scope): Reset defining_class_p.
611         * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
612         defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
613         unwinding to class-defining scope to handle the erroneous definition of
614         a generic function of an arbitrarily nested class within an enclosing
615         class.
617 2014-03-26  Fabien Chêne  <fabien@gcc.gnu.org>
619         PR c++/52369
620         * method.c (walk_field_subobs): Improve the diagnostic
621         locations for both REFERENCE_TYPEs and non-static const members.
622         * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
623         instead of %qD to be consistent with the c++11 diagnostic.
625 2014-03-25  Jason Merrill  <jason@redhat.com>
627         PR c++/60566
628         PR c++/58678
629         * class.c (build_vtbl_initializer): Handle abstract dtors here.
630         * search.c (get_pure_virtuals): Not here.
632         PR c++/60375
633         * parser.c (cp_parser_lambda_expression): Don't parse the body of
634         a lambda in unevaluated context.
636         PR c++/60628
637         * decl.c (create_array_type_for_decl): Complain about array of auto.
639 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
641         PR c++/60331
642         * semantics.c (potential_constant_expression_1): Handle
643         DECL_EXPR.
645 2014-03-24  Adam Butcher  <adam@jessamine.co.uk>
647         PR c++/60627
648         * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
649         introducing an implicit function template parameter within an explicit
650         instantiation.
652 2014-03-22  Jason Merrill  <jason@redhat.com>
654         PR c++/60574
655         * decl.c (grokdeclarator): Change permerror about 'virtual auto'
656         to error.
658 2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
660         PR c++/60384
661         * name-lookup.c (push_class_level_binding_1): Check identifier_p
662         on the name argument.
664 2014-03-20  Jakub Jelinek  <jakub@redhat.com>
666         PR c++/60572
667         * init.c (build_zero_init_1): Ignore fields with error_mark_node
668         type.
670 2014-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
672         PR c++/51474
673         * call.c (build_new_method_call_1): Handle pure virtuals called by
674         NSDMIs too.
676 2014-03-17  Adam Butcher  <adam@jessamine.co.uk>
678         PR c++/60390
679         * parser.c (cp_parser_member_declaration): Don't allow
680         finish_fully_implicit_template to consider friend declarations to be
681         class member templates.
682         (synthesize_implicit_template_parm): Handling winding back through class
683         scope to the class being defined in order to inject a template argument
684         list.
686         PR c++/60391
687         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
688         function scope as per cp_parser_skip_to_end_of_statement.
690 2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
692         PR c++/59571
693         * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
695 2014-03-14  Jason Merrill  <jason@redhat.com>
697         PR c++/60532
698         PR c++/58678
699         * search.c (get_pure_virtuals): Handle abstract dtor here.
700         (dfs_get_pure_virtuals): Not here.
702         PR c++/58678
703         * search.c (dfs_get_pure_virtuals): Treat the destructor of an
704         abstract class as pure.
706 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
708         PR c++/60383
709         * pt.c (maybe_process_partial_specialization): Check return value
710         of check_specialization_namespace.
712 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
714         PR c++/60254
715         * semantics.c (finish_static_assert): Call cxx_constant_value only
716         if require_potential_rvalue_constant_expression returns true.
718 2014-03-11  Paolo Carlini  <paolo.carlini@oracle.com>
720         PR c++/60389
721         * method.c (get_inherited_ctor): New.
722         * cp-tree.h (get_inherited_ctor): Declare it.
723         * semantics.c (is_valid_constexpr_fn): Use it.
725 2014-03-10  Jason Merrill  <jason@redhat.com>
727         PR c++/60367
728         * call.c (convert_default_arg): Remove special handling for
729         CONSTRUCTOR.
731         PR c++/53492
732         * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
733         when deciding whether to call push_template_decl for a member class.
734         * pt.c (push_template_decl_real): Return after wrong levels error.
736 2014-03-08  Adam Butcher  <adam@jessamine.co.uk>
738         PR c++/60033
739         * pt.c (tsubst_copy): When retrieving a capture pack from a generic
740         lambda, remove the lambda's own template argument list prior to fetching
741         the specialization.
743         PR c++/60393
744         * parser.c (cp_parser_parameter_declaration_clause): Move generic
745         function template unwinding on error into a more general location, ...
746         (cp_parser_skip_to_end_of_statement): ... here.
748 2014-03-07  Jason Merrill  <jason@redhat.com>
750         * Make-lang.in (check_g++_parallelize): Split dg.exp.
752         * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
753         we're in a trailing return type.
755         * typeck.c (comp_template_parms_position): 'auto' and
756         'decltype(auto)' are different from real template parms.
758         * parser.c (cp_parser_using_declaration): Consume the semicolon
759         after bare parameter pack error.
761         * cp-tree.h (REF_PARENTHESIZED_P): New.
762         * semantics.c (force_paren_expr): Set it.
763         * pt.c (do_auto_deduction): Check it.
764         (tsubst) [COMPONENT_REF]: Copy it.
765         * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
767         * decl.c (create_array_type_for_decl): Only warn about invalid
768         C++1y VLA if flag_iso or warn_vla>0.
769         (grokdeclarator): Likewise.
770         * pt.c (tsubst): Likewise.
771         * semantics.c (finish_decltype_type): Likewise.
772         * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
773         (cp_build_addr_expr_1): Likewise.
774         * init.c (build_new_1): Improve diagnostics.
776 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
778         PR c++/58609
779         * decl.c (check_initializer): Return NULL_TREE after error;
780         consistently use inform.
782 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
784         * decl.c (check_initializer): Remove dead code.
786 2014-03-06  Marek Polacek  <polacek@redhat.com>
788         PR c/60197
789         * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
790         of checking tree code.
792 2014-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
794         * parser.c (cp_lexer_set_source_position): New.
795         (cp_parser_mem_initializer): Use it.
796         (cp_parser_postfix_open_square_expression): Likewise.
797         (cp_parser_parenthesized_expression_list): Likewise.
798         (cp_parser_new_initializer): Likewise.
799         (cp_parser_jump_statement): Likewise.
800         (cp_parser_initializer): Likewise.
801         (cp_parser_functional_cast): Likewise.
803 2014-03-05  Jason Merrill  <jason@redhat.com>
805         PR c++/60409
806         * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
807         dependent expression.
809         PR c++/60361
810         * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
811         if re-parsing might succeed.
812         * semantics.c (finish_id_expression): Use of a parameter outside
813         the function body is a parse error.
815         * parser.c (cp_parser_mem_initializer): Set input_location
816         properly for init-list warning.
817         (cp_parser_postfix_open_square_expression): Likewise.
818         (cp_parser_parenthesized_expression_list): Likewise.
819         (cp_parser_new_initializer): Likewise.
820         (cp_parser_jump_statement): Likewise.
821         (cp_parser_initializer): Likewise.
822         (cp_parser_functional_cast): Likewise.
824 2014-03-04  Jason Merrill  <jason@redhat.com>
826         PR c++/60417
827         * typeck2.c (process_init_constructor_record): Set
828         CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
830         PR c++/60415
831         PR c++/54359
832         * parser.c (cp_parser_direct_declarator): Set declarator to
833         cp_error_declarator on invalid qualified-id.
835 2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
837         PR c++/60376
838         * parser.c (cp_parser_using_declaration): Early return when
839         cp_parser_nested_name_specifier errors out.
841 2014-03-01  Adam Butcher  <adam@jessamine.co.uk>
843         PR c++/60377
844         * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
845         function scope on parse error in function parameter list.
847 2014-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
849         * method.c (implicitly_declare_fn): Remove redundant
850         DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
851         * semantics.c (is_instantiation_of_constexpr): Likewise.
852         * error.c (dump_function_decl): Likewise.
854 2014-03-01  Jason Merrill  <jason@redhat.com>
856         PR c++/60379
857         * semantics.c (begin_maybe_infinite_loop): Use
858         fold_non_dependent_expr_sfinae.
860 2014-02-28  Jason Merrill  <jason@redhat.com>
862         PR c++/58845
863         * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
865 2014-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
867         PR c++/58610
868         * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
869         * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
870         * lambda.c (maybe_add_lambda_conv_op): Likewise.
872 2014-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
874         PR c++/60253
875         * call.c (convert_arg_to_ellipsis): Return error_mark_node after
876         error_at.
878 2014-02-27  Jason Merrill  <jason@redhat.com>
880         PR c++/60353
881         PR c++/55877
882         * decl2.c (tentative_decl_linkage): Don't mess with functions that
883         are not yet defined.
885 2014-02-26  Jason Merrill  <jason@redhat.com>
887         PR c++/60347
888         PR lto/53808
889         * class.c (clone_function_decl): Don't note_vague_linkage_fn.
890         * init.c (build_vtbl_address): Do it here.
892         PR c++/59231
893         PR c++/11586
894         PR c++/14710
895         PR c++/57132
896         * pt.c (struct warning_sentinel): New.
897         (tsubst_copy_and_build): Use it instead of
898         c_inhibit_evaluation_warnings.
899         * typeck.c (maybe_warn_about_useless_cast): Remove
900         c_inhibit_evaluation_warnings check.
902         PR c++/54440
903         * pt.c (get_template_parm_index): New.
904         (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
905         (process_template_parm): Allow bare packs in template template
906         parm template parms.
907         (coerce_template_parameter_pack): Handle fixed template template
908         parm packs and fixed packs not at the end of the parm list.
909         (coerce_template_parms): Handle template parm packs not at the end
910         of the parm list.
911         (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
913         PR c++/60182
914         * pt.c (unify): Ignore alias templates when deducing a template
915         template parameter.
917         PR c++/60345
918         Revert:
919         DR 1571
920         * call.c (reference_binding): Recurse on user-defined conversion.
921         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
923 2014-02-25  Jason Merrill  <jason@redhat.com>
925         DR 1571
926         * call.c (reference_binding): Recurse on user-defined conversion.
927         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
929         * call.c (print_conversion_rejection): Handle n_arg of -2.
930         (build_user_type_conversion_1): Pass it.
932         PR c++/55877
933         * decl2.c (no_linkage_error): Handle C++98 semantics.
934         (reset_type_linkage): Move from decl.c.
935         (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
936         (bt_reset_linkage_2, reset_decl_linkage): New.
937         (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
938         (cp_write_global_declarations): Move condition into no_linkage_error.
939         * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
940         * semantics.c (expand_or_defer_fn_1): Factor out
941         tentative_decl_linkage.
942         * cp-tree.h: Adjust.
944         * decl2.c (finish_static_data_member_decl): Diagnose static data
945         member in unnamed class.
946         * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
948         PR lto/53808
949         * class.c (clone_function_decl): Call note_vague_linkage_fn for
950         defaulted virtual dtor.
952         DR 1286
953         PR c++/60328
954         * pt.c (get_underlying_template): Fix equivalence calculation.
956 2014-02-25  Adam Butcher  <adam@jessamine.co.uk>
958         PR c++/60311
959         * parser.c (function_being_declared_is_template_p): Return false when
960         processing a template parameter list.
961         (cp_parser_parameter_declaration_clause): Don't set
962         auto_is_implicit_function_template_parm_p when processing a
963         template parameter list.
965         * parser.c (synthesize_implicit_template_parm): Inject new template
966         argument list appropriately when a generic member function
967         of a class template is declared out-of-line.
969         PR c++/60065
970         * parser.c (cp_parser_direct_declarator): Don't save and
971         restore num_template_parameter_lists around call to
972         cp_parser_parameter_declaration_list.
973         (function_being_declared_is_template_p): New predicate.
974         (cp_parser_parameter_declaration_list): Use
975         function_being_declared_is_template_p as predicate for
976         inspecting current function template parameter list length
977         rather than num_template_parameter_lists.
979 2014-02-24  Jason Merrill  <jason@redhat.com>
981         PR c++/60146
982         * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
983         DECL_EXPR initialize a non-class iterator.
985         PR c++/60312
986         * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
988 2014-02-21  Jason Merrill  <jason@redhat.com>
990         PR c++/58170
991         * parser.c (cp_parser_type_name): Always check dependency.
992         (cp_parser_type_specifier_seq): Call
993         cp_parser_parse_and_diagnose_invalid_type_name.
995         PR c++/60108
996         * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
998         PR c++/60185
999         * parser.c (cp_parser_default_argument): Clear
1000         current_class_ptr/current_class_ref like tsubst_default_argument.
1002         PR c++/60252
1003         * lambda.c (maybe_resolve_dummy): Check lambda_function rather
1004         than current_binding_level.
1006         PR c++/60186
1007         * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
1009         PR c++/60187
1010         * parser.c (cp_parser_enum_specifier): Call
1011         check_for_bare_parameter_packs.
1013         PR c++/59347
1014         * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
1015         erroneous typedef.
1017         PR c++/60241
1018         * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
1019         of the partial instantiation, not the most general template.
1020         (maybe_process_partial_specialization): Reassign everything on
1021         that list.
1023         PR c++/60216
1024         * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
1025         (check_explicit_specialization): Don't clone.
1027         PR c++/60219
1028         * pt.c (coerce_template_parms): Bail if argument packing fails.
1030         PR c++/60224
1031         * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
1032         Don't get confused by a CONSTRUCTOR that already has a type.
1034         PR c++/60227
1035         * call.c (build_array_conv): Don't crash on VLA.
1037         PR c++/60248
1038         * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
1040         PR c++/60252
1041         * lambda.c (maybe_resolve_dummy): Don't try to capture this
1042         in declaration context.
1044         DR 1591
1045         PR c++/60051
1046         * pt.c (unify): Only unify if deducible.  Handle 0-length list.
1048         PR c++/60250
1049         * parser.c (cp_parser_direct_declarator): Don't wrap a
1050         type-dependent expression in a NOP_EXPR.
1052         PR c++/60251
1053         * lambda.c (is_normal_capture_proxy): Handle VLA capture.
1055         PR c++/60167
1056         PR c++/60222
1057         PR c++/58606
1058         * parser.c (cp_parser_template_argument): Restore dereference.
1059         * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
1060         (process_partial_specialization): Handle deref.
1061         (unify): Likewise.
1063 2014-02-21  Adam Butcher  <adam@jessamine.co.uk>
1065         PR c++/60052
1066         PR c++/60053
1067         * parser.c (cp_parser_parameter_declaration_list): Correctly reset
1068         implicit_template_scope upon leaving an out-of-line generic member
1069         function definition.
1071 2014-02-20  Kai Tietz  <ktietz@redhat.com>
1073         PR c++/58873
1074         * parser.c (cp_parser_functional_cast): Treat NULL_TREE
1075         valued type argument as error_mark_node.
1077         PR c++/58835
1078         * semantics.c (finish_fname): Handle error_mark_node.
1080 2014-02-19  Jason Merrill  <jason@redhat.com>
1082         PR c++/60046
1083         * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
1084         spec from template context.
1086 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
1088         PR debug/56563
1089         * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
1090         FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
1092         PR c++/60267
1093         * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
1095 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
1097         PR c++/60225
1098         * semantics.c (ensure_literal_type_for_constexpr_object): Use
1099         strip_array_types.
1101 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
1103         PR c++/60215
1104         * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
1105         During error recovery allow_non_constant may be false.
1107 2014-02-18  Adam Butcher  <adam@jessamine.co.uk>
1109         PR c++/60190
1110         * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
1111         scope whenever a template parameter list has been started, independent
1112         of whether the function call operator was well-formed or not.
1114         PR c++/60064
1115         * parser.c (cp_parser_member_declaration): Pop fully implicit template
1116         scope for generic friend declarations as well as for non-friends.
1118 2014-02-12  Paolo Carlini  <paolo.carlini@oracle.com>
1120         PR c++/60047
1121         * method.c (implicitly_declare_fn): A constructor of a class with
1122         virtual base classes isn't constexpr (7.1.5p4).
1124 2014-02-05  Jan Hubicka  <hubicka@ucw.cz
1126         * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
1128 2014-02-05  Jakub Jelinek  <jakub@redhat.com>
1130         PR c++/58703
1131         * parser.c (cp_parser_omp_declare_reduction): Save and free
1132         declarator_obstack.
1134 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
1136         PR c++/53017
1137         PR c++/59211
1138         * tree.c (handle_init_priority_attribute): Call default_conversion on
1139         the attribute argument.
1141 2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
1143         PR c++/58871
1144         * method.c (synthesized_method_walk): If vbases is non-null but
1145         is_empty is true, likewise don't worry about the virtual bases.
1147 2014-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
1149         PR c++/51219
1150         * typeck2.c (process_init_constructor_record): Just skip unnamed
1151         bit-fields.
1153 2014-01-31  Jason Merrill  <jason@redhat.com>
1155         PR c++/59469
1156         * pt.c (mark_decl_instantiated): Call mark_needed.
1158         PR c++/58672
1159         * decl2.c (handle_tls_init): Handle null init fn.
1161         PR c++/55800
1162         * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
1164 2014-01-31  Paolo Carlini  <paolo.carlini@oracle.com>
1166         PR c++/59082
1167         * class.c (build_vfield_ref): Early return error_mark_node if
1168         TYPE_VFIELD (type) is null.
1169         (build_base_path): Check return value of build_vfield_ref.
1171 2014-01-31  Jason Merrill  <jason@redhat.com>
1173         PR c++/59646
1174         * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
1175         [ck_list]: Check for error_mark_node.
1176         (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
1178         PR c++/57043
1179         * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
1180         during partial ordering.
1182 2014-01-31  Marek Polacek  <polacek@redhat.com>
1184         PR c/59963
1185         * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
1187 2014-01-30  Jason Merrill  <jason@redhat.com>
1189         PR c++/57899
1190         * cp-tree.h (struct saved_scope): Add x_local_specializations.
1191         (local_specializations): New macro.
1192         * pt.c (local_specializations): Remove variable.
1194 2014-01-30  Richard Sandiford  <rdsandiford@googlemail.com>
1196         PR c++/58708
1197         * parser.c (make_string_pack): Use double_int::from_buffer.
1199 2014-01-30  Marek Polacek  <polacek@redhat.com>
1201         PR c/59940
1202         * typeck.c (build_ptrmemfunc1): Call convert_and_check with
1203         input_location.
1204         * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
1205         with input_location.
1206         * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
1207         loc parameter.
1209 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
1211         PR c++/58843
1212         * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
1214 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
1216         PR c++/58649
1217         * pt.c (lookup_template_class_1): Check start_enum return value
1218         for error_mark_node.
1220 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
1222         * decl.c (duplicate_decls, typename_hash, typename_compare):
1223         Use TYPE_IDENTIFIER.
1224         * error.c (dump_type): Likewise.
1225         * mangle.c (dump_substitution_candidates): Likewise.
1227 2014-01-30  Jason Merrill  <jason@redhat.com>
1229         PR c++/59633
1230         * decl2.c (attributes_naming_typedef_ok): New.
1231         * cp-tree.h: Declare it.
1232         * decl.c (grokdeclarator): Check it.
1233         * tree.c (no_linkage_check): Handle VECTOR_TYPE.
1235 2014-01-29  Jason Merrill  <jason@redhat.com>
1237         PR c++/59707
1238         * call.c (add_builtin_candidate): Catch dependent types.
1240         PR c++/59989
1241         * pt.c (expand_template_argument_pack): Correct
1242         non_default_args_count calculation.
1244         PR c++/58466
1245         * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
1247         PR c++/59956
1248         * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
1249         have a friend template in a class template.
1250         * pt.c (tsubst_friend_function): Look through it.
1251         (push_template_decl_real): A friend member template is
1252         primary.
1254 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1256         PR c++/58846
1257         * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
1258         == error_mark_node.
1260 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1262         PR c++/58674
1263         * pt.c (instantiate_template_1): Check for error_mark_node the second
1264         argument too.
1266 2014-01-29  Jason Merrill  <jason@redhat.com>
1268         PR c++/59916
1269         * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
1270         cdtor_returns_this case.
1272         PR c++/59315
1273         * decl.c (cxx_maybe_build_cleanup): Call mark_used.
1275 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1277         PR c++/58702
1278         * semantics.c (finish_omp_reduction_clause): Check type for
1279         error_mark_node.
1281 2014-01-28  Jason Merrill  <jason@redhat.com>
1283         PR c++/59791
1284         * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
1285         (tsubst_copy): Use it if lookup fails.
1287         PR c++/59818
1288         * pt.c (tsubst_function_type): Make sure we keep the same function
1289         quals.
1291         PR c++/58701
1292         * semantics.c (build_anon_member_initialization): Stop walking
1293         when we run out of COMPONENT_REFs.
1295         PR c++/58632
1296         * decl.c (lookup_and_check_tag): Ignore template parameters if
1297         scope == ts_current.
1298         * pt.c (check_template_shadow): Don't complain about the injected
1299         class name.
1301         * decl.c (duplicate_decls): Tweak.
1303         PR c++/53756
1304         * mangle.c (write_unqualified_name): Handle operator auto.
1306 2014-01-27  Jason Merrill  <jason@redhat.com>
1308         PR c++/59823
1309         Core DR 1138
1310         * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
1311         list-initialization.  A conversion to rvalue ref that involves
1312         an lvalue-rvalue conversion is bad.
1313         (convert_like_real): Give helpful error message.
1315         PR c++/54652
1316         * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
1318         PR c++/58504
1319         * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
1320         types.
1322         PR c++/58606
1323         * pt.c (template_parm_to_arg): Call convert_from_reference.
1324         (tsubst_template_arg): Don't strip reference refs.
1326         PR c++/58639
1327         * call.c (build_aggr_conv): Reject value-initialization of reference.
1329         PR c++/58812
1330         PR c++/58651
1331         * call.c (convert_like_real): Give helpful error about excess braces
1332         for ck_rvalue of scalar type.
1334         Core DR 1288
1335         * call.c (reference_binding): Only elide braces if the single
1336         element is reference-related.
1338         PR c++/58814
1339         * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
1340         stabilizing.
1342         PR c++/58837
1343         * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
1344         FUNCTION_DECL.
1346         PR c++/59097
1347         * decl.c (compute_array_index_type): Don't call
1348         maybe_constant_value for a non-integral expression.
1350 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1352         * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
1353         flag_cilkplus.
1354         * cp-gimplify.c (cp_genericize): Likewise.
1355         * decl.c (grokfndecl): Likewise.
1356         * parser.c (cp_parser_postfix_expression): Likewise.
1357         (cp_parser_postfix_open_square_expression): Likewise.
1358         (cp_parser_direct_declarator): Likewise.
1359         (is_cilkplus_vector_p): Likewise.
1360         (cp_parser_omp_clause_name): Likewise.
1361         (cp_parser_omp_all_clauses): Likewise.
1362         * pt.c (apply_late_template_attributes): Likewise.
1363         * typeck.c (cp_build_array_ref): Likewise.
1364         (cp_build_compound_expr): Likewise.
1365         (check_return_expr): Likewise.
1367 2014-01-24  Jason Merrill  <jason@redhat.com>
1369         PR c++/58550
1370         * decl.c (grokdeclarator): Turn pedwarn about auto return type in
1371         c++11 into error.
1373         PR c++/59886
1374         PR c++/59659
1375         * typeck2.c (process_init_constructor_array): Don't create
1376         RANGE_EXPR yet.
1378 2014-01-24  Jakub Jelinek  <jakub@redhat.com>
1380         * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
1381         handling for RANGE_ARRAY case.
1383 2014-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
1385         PR c++/57524
1386         * name-lookup.c (push_using_directive): Use timevar_cond_start.
1388 2014-01-23  Marek Polacek  <polacek@redhat.com>
1390         PR c/59846
1391         * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
1393 2014-01-23  Marek Polacek  <polacek@redhat.com>
1395         PR c/58346
1396         * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1397         an empty aggregate.
1399 2014-01-23  Jason Merrill  <jason@redhat.com>
1401         PR c++/55189
1402         * cp-tree.h (struct language_function): Add infinite_loop and
1403         infinite_loops.
1404         (current_function_infinite_loop): New.
1405         * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
1406         (break_maybe_infinite_loop): New.
1407         (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
1408         (finish_do_stmt, finish_for_cond, finish_for_stmt)
1409         (begin_range_for_stmt): Use them.
1410         * decl.c (finish_function): Don't warn about missing return
1411         if current_function_infinite_loop.
1412         * pt.c (instantiate_decl): Copy current_function_infinite_loop.
1413         * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
1415         * call.c (build_op_delete_call): Use make_tree_vector and
1416         release_tree_vector.
1418 2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
1420         PR c++/58980
1421         * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
1422         nested_name_specifier.
1424 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1426         * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
1427         see if there is an attribute after function decl.  If so, then
1428         parse them now.
1429         (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
1430         enabled function late parsing.
1431         (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
1432         attribute for a SIMD-enabled function.
1433         (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
1434         the function is used by SIMD-enabled function (indicated by NULL
1435         pragma token).   Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
1436         PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
1437         (cp_parser_cilk_simd_vectorlength): Modified this function to handle
1438         vectorlength clause in SIMD-enabled function and #pragma SIMD's
1439         vectorlength clause.  Added a new bool parameter to differentiate
1440         between the two.
1441         (cp_parser_cilk_simd_fn_vector_attrs): New function.
1442         (is_cilkplus_vector_p): Likewise.
1443         (cp_parser_late_parsing_elem_fn_info): Likewise.
1444         (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
1445         and "vectorlength" clauses when Cilk Plus is enabled.
1446         (cp_parser_omp_clause_linear): Added a new parameter of type bool
1447         and emit a sorry message when step size is a parameter.
1448         * parser.h (cp_parser::cilk_simd_fn_info): New field.
1449         * decl.c (grokfndecl): Added flag_enable_cilkplus along with
1450         flag_openmp.
1451         * pt.c (apply_late_template_attributes): Likewise.
1453 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
1455         PR middle-end/58809
1456         * semantics.c (finish_omp_reduction_clause): Reject
1457         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1459 2014-01-22  Ville Voutilainen  <ville.voutilainen@gmail.com>
1461         PR c++/59482
1462         * parser.c (cp_parser_class_head): Push the class before parsing
1463         the base-clause, pop after it.
1465 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
1467         * decl2.c (cpp_check): Revert prototype change.
1469 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
1471         PR c++/59270
1472         PR c++/58811
1473         * init.c (build_value_init_noctor): Don't pass error_mark_node to
1474         build_value_init.
1476 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
1478         PR c++/59269
1479         * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
1480         only when errorcount == 0.
1482 2014-01-17  Marek Polacek  <polacek@redhat.com>
1484         PR c++/59838
1485         * cvt.c (ocp_convert): Don't segfault on non-existing
1486         ENUM_UNDERLYING_TYPE.
1488 2014-01-16  Jason Merrill  <jason@redhat.com>
1490         PR c++/59821
1491         * tree.c (bot_manip): Update the location of builtin_LINE and
1492         builtin_FILE calls.
1494 2014-01-14  Jason Merrill  <jason@redhat.com>
1496         PR c++/59659
1497         * typeck2.c (massage_init_elt): New.
1498         (process_init_constructor_record)
1499         (process_init_constructor_union): Use it.
1500         (process_init_constructor_array): Use it.  Use RANGE_EXPR.
1501         (split_nonconstant_init_1): Handle it.
1502         * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
1504 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1506         PR c++/59631
1507         * parser.c (cp_parser_postfix_expression): Added a new if-statement
1508         and replaced an existing if-statement with else-if statement.
1509         Changed an existing error message wording to match the one from the C
1510         parser.
1512 2014-01-08  Jason Merrill  <jason@redhat.com>
1514         PR c++/59614
1515         * class.c (abi_tag_data): Add tags field.
1516         (check_abi_tags): Initialize it.
1517         (find_abi_tags_r): Support collecting missing tags.
1518         (mark_type_abi_tags): Don't look at template args.
1519         (inherit_targ_abi_tags): New.
1520         (check_bases_and_members): Use it.
1521         * cp-tree.h (ABI_TAG_IMPLICIT): New.
1522         * mangle.c (write_abi_tags): Check it.
1524 2014-01-07  Jason Merrill  <jason@redhat.com>
1526         PR c++/58856
1527         * pt.c (num_innermost_template_parms): New.
1528         (get_underlying_template): Use it.
1530         PR c++/58965
1531         * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
1533 2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
1535         * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
1536         the letter of 20.11.6 about Base and Derived naming the same
1537         class type modulo cv-qualifiers.
1539 2014-01-06  Adam Butcher  <adam@jessamine.co.uk>
1541         PR c++/59635
1542         * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
1543         function as unimplemented for generic lambdas with varargs.
1545         PR c++/59636
1546         * parser.c (cp_parser_template_parameter): Early out with
1547         error_mark_node if parameter declaration was not parsed.
1549         PR c++/59629
1550         * parser.c (cp_parser_lambda_expression): Save/reset/restore
1551         auto_is_implicit_function_template_parm_p around lambda body.
1553         PR c++/59638
1554         * parser.c (cp_parser_init_declarator): Undo fully implicit
1555         template parameter list when declarator is not a function.
1557 2014-01-03  Marc Glisse  <marc.glisse@inria.fr>
1559         PR c++/58950
1560         * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
1562 2014-01-03  Tobias Burnus  <burnus@net-b.de>
1564         PR c++/58567
1565         * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
1567 2014-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1569         Core DR 1442
1570         PR c++/59165
1571         * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
1572         as include_std to perform_koenig_lookup.
1573         (cp_parser_postfix_expression): Adjust.
1574         * pt.c (tsubst_copy_and_build): Likewise.
1575         * semantics.c (perform_koenig_lookup): Remove bool parameter.
1576         (omp_reduction_lookup): Adjust.
1577         * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
1578         (lookup_arg_dependent): Likewise.
1579         (lookup_function_nonclass): Adjust.
1580         * name-lookup.h: Adjust declaration.
1581         * cp-tree.h: Likewise.
1583 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
1585         PR c++/59087
1586         * parser.c (cp_parser_userdef_numeric_literal): Mention
1587         -fext-numeric-literals in the message.
1589 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
1591         PR c++/59641
1592         * call.c (build_conditional_expr_1): Check the return value of
1593         force_rvalue.
1595 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
1597         * call.c (convert_like_real): Check complain.
1599 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
1601         PR c++/59378
1602         * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
1603         in templates.
1605 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1607         Update copyright years
1609 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1611         * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
1612         the standard form for the copyright notice.
1614 Copyright (C) 2014 Free Software Foundation, Inc.
1616 Copying and distribution of this file, with or without modification,
1617 are permitted in any medium without royalty provided the copyright
1618 notice and this notice are preserved.