* c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2016-03-14  Casey Carter  <casey@carter.net>
2             Jason Merrill  <jason@redhat.com>
3
4         P0184R0: Generalizing the Range-Based For Loop
5         * parser.c (cp_convert_range_for): Set the type of __end separately.
6         (cp_parser_perform_range_for_lookup): Allow different begin/end
7         types if they are comparable.
8
9 2016-03-12  Patrick Palka  <ppalka@gcc.gnu.org>
10
11         PR c++/70106
12         * semantics.c (force_paren_expr): Just build a PAREN_EXPR when
13         processing_template_decl and EXPR is a SCOPE_REF.
14
15 2016-03-10  Patrick Palka  <ppalka@gcc.gnu.org>
16             Jakub Jelinek  <jakub@redhat.com>
17
18         PR c++/70001
19         * constexpr.c (cxx_eval_vec_init_1): For pre_init case, reuse
20         return value from cxx_eval_constant_expression from earlier
21         elements if it is valid constant initializer requiring no
22         relocations.
23
24 2016-03-10  Marek Polacek  <polacek@redhat.com>
25
26         PR c++/70153
27         * cp-gimplify.c (cp_fold): Handle UNARY_PLUS_EXPR.
28
29 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
30
31         * parser.c (cp_parser_oacc_loop): Update cclauses and clauses
32         when calling c_finish_omp_clauses.
33
34 2016-03-08  Jason Merrill  <jason@redhat.com>
35
36         * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
37         diagnostic for use of "concept".
38         (cp_parser_requires_clause_opt): And "requires".
39         (cp_parser_type_parameter, cp_parser_late_return_type_opt)
40         (cp_parser_explicit_template_declaration): Adjust.
41         * Make-lang.in (check-c++-all): Add "concepts" to std list.
42
43         P0036R0: Unary Folds and Empty Parameter Packs
44         * pt.c (expand_empty_fold): Remove special cases for *,+,&,|.
45
46 2016-03-08  Jakub Jelinek  <jakub@redhat.com>
47
48         PR c++/70135
49         * constexpr.c (cxx_eval_loop_expr): Forget saved values of SAVE_EXPRs
50         even after the last iteration of the loop.
51
52         * decl.c (duplicate_decls): Fix spelling - becuase -> because.
53
54 2016-03-07  Patrick Palka  <ppalka@gcc.gnu.org>
55
56         PR c++/66786
57         * pt.c (get_template_info): Handle PARM_DECL.
58         (template_class_depth): Check DECL_P instead of
59         VAR_OR_FUNCTION_DECL_P.
60
61 2016-03-05  Jason Merrill  <jason@redhat.com>
62
63         PR c++/67364
64         * constexpr.c (cxx_eval_store_expression): Replace
65         CONSTRUCTOR_ELTS in nested CONSTRUCTORs, too.
66
67 2016-03-05  Patrick Palka  <ppalka@gcc.gnu.org>
68
69         PR c++/66786
70         * pt.c (template_class_depth): Given a lambda type, iterate
71         into its LAMBDA_TYPE_EXTRA_SCOPE field instead of its
72         TYPE_CONTEXT.  Given a VAR_DECL, iterate into its
73         CP_DECL_CONTEXT.
74
75 2016-03-04  Jason Merrill  <jason@redhat.com>
76
77         PR c++/69203
78         * cp-tree.h (COND_EXPR_IS_VEC_DELETE): New.
79         * init.c (build_vec_delete_1): Set it.
80         * constexpr.c (potential_constant_expression_1) [COND_EXPR]: Check it.
81
82 2016-03-04  Jakub Jelinek  <jakub@redhat.com>
83
84         * decl.c (start_preparsed_function): Don't emit start clobber at the
85         start of constructor clones.
86
87         PR c++/70035
88         * cp-tree.h (cp_ubsan_maybe_initialize_vtbl_ptrs): New prototype.
89         * decl.c (start_preparsed_function): Call
90         cp_ubsan_maybe_initialize_vtbl_ptrs if needed.
91         * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs,
92         cp_ubsan_maybe_initialize_vtbl_ptrs): New functions.
93
94 2016-03-04  Jason Merrill  <jason@redhat.com>
95
96         PR c++/67364
97         * constexpr.c (cxx_eval_component_reference): Further tweak.
98
99         * constexpr.c (struct constexpr_ctx): Add save_exprs field.
100         (cxx_eval_loop_expr): Discard SAVE_EXPR values before looping.
101         (cxx_eval_constant_expression) [SAVE_EXPR]: Add it to the set.
102         (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Initialize.
103
104         PR c++/70067
105         * tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
106         same type.
107
108 2016-03-03  Jason Merrill  <jason@redhat.com>
109
110         * method.c (synthesized_method_walk): operator= can also be constexpr.
111
112         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Get
113         LAMBDA_EXPR_RETURN_TYPE from the instantiated closure.
114
115         PR c++/67164
116         * pt.c (copy_template_args): New.
117         (tsubst_pack_expansion): Use it.
118
119         * call.c (build_aggr_conv): Use get_nsdmi.
120
121         PR c++/51406
122         * typeck.c (build_static_cast_1): Avoid folding back to lvalue.
123
124         PR c++/67364
125         * constexpr.c (cxx_eval_component_reference): Just return an empty
126         CONSTRUCTOR for an empty class.
127
128 2016-03-01  Jason Merrill  <jason@redhat.com>
129
130         PR c++/70036
131         * parser.c (cp_parser_requires_clause): Call
132         check_for_bare_parameter_packs.
133
134         PR c++/51489
135         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
136         the operands.
137
138         PR c++/69995
139         * constexpr.c (cxx_eval_call_expression): Unshare arg.
140         (cxx_eval_constant_expression) [DECL_EXPR]: Unshare init.
141         [TARGET_EXPR]: Unshare init.
142
143 2016-03-01  Patrick Palka  <ppalka@gcc.gnu.org>
144
145         PR c++/68948
146         PR c++/69961
147         * pt.c (tsubst_baselink): Reinstate the check for an invalid
148         constructor call.
149
150 2016-02-28  Jason Merrill  <jason@redhat.com>
151
152         PR c++/69995
153         * constexpr.c (cxx_eval_store_expression): Unshare init.
154
155 2016-02-26  Jason Merrill  <jason@redhat.com>
156
157         PR c++/69958
158         * pt.c (make_argument_pack): New.
159         (tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion.
160         (tsubst_copy_and_build): Likewise.
161
162 2016-02-25  Jason Merrill  <jason@redhat.com>
163
164         PR c++/69889
165         * cp-tree.h (AGGR_INIT_FROM_THUNK_P): New.
166         * tree.c (build_aggr_init_expr): Set it.
167         * semantics.c (simplify_aggr_init_expr): Check it.
168         * cp-gimplify.c (cp_genericize_r): Don't walk into
169         a call/aggr_init from a thunk.
170
171         PR c++/69842
172         * method.c (forward_parm): Handle parameter packs.
173         * lambda.c (maybe_add_lambda_conv_op): Use it for them.
174
175         PR c++/67364
176         * constexpr.c (cxx_eval_component_reference): Don't complain about
177         unevaluated empty classes.
178
179         PR c++/68049
180         * tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.
181
182 2016-02-25  Patrick Palka  <ppalka@gcc.gnu.org>
183
184         PR c++/69736
185         * cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
186         (maybe_undo_parenthesized_ref): Declare.
187         * semantics.c (maybe_undo_parenthesized_ref): Split out from
188         check_return_expr.
189         (finish_call_expr): Use it.
190         * typeck.c (check_return_expr): Use it.
191         * pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
192         REF_PARENTHESIZED_P flag.
193
194 2016-02-24  Jakub Jelinek  <jakub@redhat.com>
195
196         PR c++/69922
197         * class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
198         Avoid folding it.
199         * init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
200         tests.
201         * cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
202         unless they are folded into INTEGER_CST, error_mark_node or some
203         comparison with NULL, avoid folding them and use either the original
204         comparison or non-folded comparison of folded arguments.
205         * cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
206         comparison, don't fold the comparison right away.
207
208 2016-02-24  Jason Merrill  <jason@redhat.com>
209
210         PR c++/69323
211         * friend.c (make_friend_class): Likewise.
212         * decl.c (lookup_and_check_tag): Diagnose invalid dependent friend.
213
214 2016-02-24  Jason Merrill  <jason@redhat.com>
215
216         PR c++/69323
217         * pt.c (instantiate_class_template_1): Set
218         processing_template_decl before substituting friend_type.
219
220 016-02-24  Martin Sebor  <msebor@redhat.com>
221
222         PR c++/69912
223         * tree.c (build_ctor_subob_ref): Compare types' main variants
224         instead of the types as they are.
225
226 2016-02-24  Jason Merrill  <jason@redhat.com>
227
228         * decl.c (start_preparsed_function): Condition ctor clobber on
229         flag_lifetime_dse > 1.
230
231         * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
232
233 2016-02-19  Jason Merrill  <jason@redhat.com>
234
235         PR c++/69743
236         * call.c (remaining_arguments): No longer static.
237         * cp-tree.h: Declare it.
238         * pt.c (more_specialized_fn): Use it.
239
240 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
241             Bernd Edlinger  <bernd.edlinger@hotmail.de>
242
243         * Make-lang.in: Invoke gperf with -L C++.
244         * cfns.gperf: Remove prototypes for hash and libc_name_p
245         inlines.
246         * cfns.h: Regenerated.
247         * except.c (nothrow_libfn_p): Adjust.
248
249 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
250
251         PR c++/69850
252         * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use
253         NE_EXPR instead of EQ_EXPR and swap last two arguments on COND_EXPR.
254
255 2016-02-19  Patrick Palka  <ppalka@gcc.gnu.org>
256
257         PR c++/68948
258         * pt.c (tsubst_baselink): Don't diagnose an invalid constructor
259         call here.
260         * semantics.c (finish_call_expr): Don't assume a constructor
261         call is dependent if only the "this" pointer is dependent.  When
262         building a constructor call, always use a dummy object.
263
264 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
265
266         PR c++/69850
267         * init.c (build_vec_delete_1): Set TREE_NO_WARNING on the NE_EXPR
268         condition.
269         * cp-gimplify.c (cp_fold): Propagate TREE_NO_WARNING from binary
270         operators if folding preserved the binop, just with different
271         arguments.
272
273         PR c++/67767
274         * parser.c (cp_parser_std_attribute_spec_seq): Don't assume
275         attr_spec is always single element chain, chain all the attributes
276         properly together in the right order.
277
278 2016-02-18  Jason Merrill  <jason@redhat.com>
279
280         * mangle.c (maybe_check_abi_tags): Add for_decl parm.  Call
281         mangle_decl.
282         (mangle_decl): Call maybe_check_abi_tags for function scope.
283         (mangle_guard_variable): Call maybe_check_abi_tags here.
284         (write_guarded_var_name): Not here.
285
286 2016-02-17  Jason Merrill  <jason@redhat.com>
287
288         PR c++/65985
289         * constexpr.c (build_constexpr_constructor_member_initializers):
290         Handle an additional STATEMENT_LIST.
291
292         PR c++/68585
293         * constexpr.c (cxx_eval_bare_aggregate): Fix 'changed' detection.
294
295         PR c++/68679
296         * decl2.c (reset_type_linkage_2): Look through member templates.
297
298 2016-02-17  Jakub Jelinek  <jakub@redhat.com>
299
300         PR c++/69850
301         * init.c (build_delete): Set TREE_NO_WARNING on ifexp.
302
303 2016-02-17  Jason Merrill  <jason@redhat.com>
304
305         PR c++/69842
306         * method.c (forward_parm): Split out from...
307         (add_one_base_init): ...here.
308         * lambda.c (maybe_add_lambda_conv_op): Use it.
309
310 2016-02-16  Jason Merrill  <jason@redhat.com>
311
312         PR c++/10200
313         PR c++/69753
314         * call.c, cp-tree.h, name-lookup.c, pt.c, search.c, semantics.c,
315         tree.c, typeck2.c: Revert earlier changes.
316         * parser.c (cp_parser_lookup_name): Ignore namespace-scope
317         non-type templates after -> or .
318
319 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
320
321         PR c/69835
322         * typeck.c (cp_build_binary_op): Revert 2015-09-09 change.
323
324 2016-02-16  Jason Merrill  <jason@redhat.com>
325
326         PR c++/69657
327         * name-lookup.c (lookup_qualified_name): Add find_hidden parm.
328         (set_decl_namespace): Pass it.  Complain about finding a hidden friend.
329         * name-lookup.h: Adjust.
330
331 2016-02-16  James Norris  <jnorris@codesourcery.com>
332
333         * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking.
334         * semantics.c (finish_omp_clauses): Add deviceptr checking.
335
336 2016-02-15  Jakub Jelinek  <jakub@redhat.com>
337
338         PR c++/69658
339         * init.c (expand_default_init): Only call reshape_init
340         in the direct-initialization from an initializer list case.
341
342 2016-02-15  Jason Merrill  <jason@redhat.com>
343
344         PR c++/69753
345         * semantics.c (finish_call_expr): Implicit 'this' does not make
346         the call dependent.
347         * search.c (any_dependent_bases_p): Split out...
348         * name-lookup.c (do_class_using_decl): ...from here.
349         * call.c (build_new_method_call_1): Don't complain about missing object
350         if there are dependent bases.  Tweak error.
351         * tree.c (non_static_member_function_p): Remove.
352         * pt.c (type_dependent_expression_p): A member template of a
353         dependent type is dependent.
354         * cp-tree.h: Adjust.
355
356         PR c++/68890
357         * constexpr.c (verify_ctor_sanity): Remove CONSTRUCTOR_NELTS check.
358
359 2016-02-12  Patrick Palka  <ppalka@gcc.gnu.org>
360
361         PR c++/69098
362         * pt.c (lookup_and_finish_template_variable): New function,
363         extracted from ...
364         (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: ... here.  Use it.
365         (tsubst_qualified_id): Consider that EXPR might be a variable
366         template.
367         * typeck.c (check_template_keyword): Don't emit an error
368         if DECL is a variable template.
369
370 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
371
372         * error.c: Spelling fixes - behaviour -> behavior and
373         neighbour -> neighbor.
374         * decl.c: Likewise.
375         * typeck.c (cp_build_binary_op): Fix up behavior spelling in
376         diagnostics.
377         * init.c (build_delete): Likewise.
378
379 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
380
381         PR c/69768
382         * typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop
383         arguments for -Waddress warning.  Fix up formatting.
384
385 2016-02-11  Paolo Carlini  <paolo.carlini@oracle.com>
386
387         PR c++/68726
388         * pt.c (lookup_template_class_1): Check tsubst return value for
389         error_mark_node.
390
391 2016-02-10  Jason Merrill  <jason@redhat.com>
392
393         PR c++/68926
394         * pt.c (resolve_nondeduced_context): Add complain parm.
395         (do_auto_deduction): Pass it.
396         * cvt.c (convert_to_void): Likewise.
397         * decl.c (cp_finish_decl): Likewise.
398         * init.c (build_new): Likewise.
399         * rtti.c (get_tinfo_decl_dynamic): Likewise.
400         * semantics.c (finish_decltype_type): Likewise.
401         * typeck.c (decay_conversion): Likewise.
402         * cp-tree.h: Adjust declaration.
403         * call.c (standard_conversion): Add complain parm, pass it along.
404         (implicit_conversion): Pass it.
405
406         PR c++/69657
407         * name-lookup.c (ambiguous_decl): Call remove_hidden_names.
408         (lookup_name_real_1): Likewise.
409         (remove_hidden_names): Handle non-functions too.
410
411         PR c++/10200
412         * parser.c (cp_parser_lookup_name): When looking for a template
413         after . or ->, only consider class templates.
414         (cp_parser_postfix_dot_deref_expression): Handle the current
415         instantiation.  Remember a dependent object expression.
416         * typeck2.c (build_x_arrow): Handle the current instantiation.
417
418         * ptree.c (debug_tree): Implement for cp_expr.
419
420 2016-02-08  Patrick Palka  <ppalka@gcc.gnu.org>
421
422         PR c++/69139
423         * parser.c (cp_parser_simple_type_specifier): Make the check
424         for disambiguating between an 'auto' placeholder and an implicit
425         template parameter more robust.
426
427 2016-02-08  Patrick Palka  <ppalka@gcc.gnu.org>
428
429         PR c++/69283
430         PR c++/67835
431         * decl2.c (mark_used): When given a TEMPLATE_DECL, return after
432         setting its TREE_USED flag.
433
434 2016-02-08  Jason Merrill  <jason@redhat.com>
435
436         PR c++/69657
437         * name-lookup.c (do_nonmember_using_decl): Leave anticipated
438         built-ins alone.
439
440 2016-02-08  Jakub Jelinek  <jakub@redhat.com>
441
442         PR c++/59627
443         * parser.c (cp_parser_omp_declare_reduction): Set assembler name
444         of the DECL_OMP_DECLARE_REDUCTION_P decls.
445
446 2016-02-08  Marek Polacek  <polacek@redhat.com>
447
448         PR c++/69688
449         * constexpr.c (clear_cv_and_fold_caches): Renamed from clear_cv_cache.
450         Call clear_fold_cache.
451         * cp-tree.h: Adjust declaration.
452         * decl.c (finish_enum_value_list): Call clear_cv_and_fold_caches
453         rather than clear_cv_cache and clear_fold_cache.
454         * typeck2.c (store_init_value): Call clear_cv_and_fold_caches.
455
456 2016-02-08  Jason Merrill  <jason@redhat.com>
457
458         * cp-tree.h (CONV_FOLD, CONV_BACKEND_CONVERT): New.
459         * cvt.c (convert): Pass CONV_BACKEND_CONVERT.
460         (ocp_convert): Use *_maybe_fold.
461         (cp_convert_to_pointer): Add dofold parameter.
462         * cp-gimplify.c (cp_fold) [CONVERT_EXPR]: Call convert.
463
464 2016-02-05  Martin Sebor  <msebor@redhat.com>
465
466         PR c++/69662
467         * init.c (find_field_init): New function.
468         (warn_placement_new_too_small): Call it.  Handle one-element arrays
469         at ends of structures special.
470
471 2016-02-05  Jason Merrill  <jason@redhat.com>
472
473         PR c++/68948
474         * semantics.c (finish_expr_stmt): If expr is error_mark_node,
475         make sure we've seen_error().
476
477 2016-02-05  Patrick Palka  <ppalka@gcc.gnu.org>
478
479         PR c++/68948
480         * pt.c (tsubst_baselink): Diagnose an invalid constructor call
481         if lookup_fnfields returns NULL_TREE and the name being looked
482         up has the form A::A.
483
484 2016-02-04  Patrick Palka  <ppalka@gcc.gnu.org>
485
486         * constexpr.c (cxx_eval_binary_expression): Fold equality
487         comparisons involving PTRMEM_CSTs.
488
489 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
490
491         * class.c (find_flexarrays): Don't declare dom variable.
492         (diagnose_flexarray): Likewise.
493
494 2016-02-02  Martain Sebor  <msebor@redhat.com>
495
496         PR c++/69251
497         PR c++/69253
498         PR c++/69290
499         PR c++/69277
500         PR c++/69349
501         * class.c (walk_subobject_offsets): Avoid testing the upper bound
502         of a flexible array member for equality to null.
503         (find_flexarrays): Remove spurious whitespace introduced in r231665.
504         (diagnose_flexarrays): Avoid checking the upper bound of arrays.
505         (check_flexarrays): Same.
506         * decl.c (compute_array_index_type): Avoid special case for flexible
507         array members.
508         (grokdeclarator): Avoid calling compute_array_index_type for flexible
509         array members.
510         * error.c (dump_type_suffix): Revert changes introduced in r231665
511         and rendered unnecessary by the changes above.
512         * pt.c (tsubst):  Same.
513         * tree.c (build_ctor_subob_ref): Handle flexible array members.
514         * typeck2.c (digest_init_r): Revert changes introduced in r231665.
515         (process_init_constructor_array): Same.
516         (process_init_constructor_record): Same.
517
518 2016-02-03  Patrick Palka  <ppalka@gcc.gnu.org>
519
520         PR c++/69056
521         * pt.c (try_one_overload): Handle comparing argument packs so
522         that there is no conflict if we deduced more arguments of an
523         argument pack than were explicitly specified.
524
525 2016-01-31  Jakub Jelinek  <jakub@redhat.com>
526             Jason Merrill  <jason@redhat.com>
527
528         PR c++/68763
529         * tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new
530         function type if nothing is changing.
531
532 2016-01-31  Jason Merrill  <jason@redhat.com>
533
534         PR c++/69009
535         * pt.c (partial_specialization_p, impartial_args): New.
536         (instantiate_decl): Call impartial_args.
537
538         * mangle.c (maybe_check_abi_tags): New.
539         (write_guarded_var_name): Call it.
540         (mangle_ref_init_variable): Call check_abi_tags.
541
542         * pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
543         between template and instantiation.
544
545 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
546
547         PR debug/66869
548         * decl.c (wrapup_globals_for_namespace): Warn about unused static
549         function declarations.
550
551 2016-01-29  Marek Polacek  <polacek@redhat.com>
552
553         PR c++/69509
554         PR c++/69516
555         * constexpr.c (cxx_eval_array_reference): Give the "array subscript
556         out of bound" error earlier.
557         * init.c (build_vec_init): Change NE_EXPR into GT_EXPR.  Update the
558         commentary.
559
560 2016-01-29  Patrick Palka  <ppalka@gcc.gnu.org>
561
562         * name-lookup.c (begin_scope): After reusing a cp_binding_level
563         structure, update free_binding_level before the structure's
564         level_chain field gets cleared, not after.
565
566 2016-01-28  Jason Merrill  <jason@redhat.com>
567
568         PR c++/67407
569         * search.c (dfs_walk_once, dfs_walk_once_r)
570         (dfs_walk_once_accessible_r, dfs_walk_once_accessible): Use
571         hash_set instead of BINFO_MARKED.
572         (dfs_unmark_r): Remove.
573
574 2016-01-28  Patrick Palka  <ppalka@gcc.gnu.org>
575
576         PR c++/24208
577         * parser.c (LEXER_DEBUGGING_ENABLED_P): New macro.
578         (cp_lexer_debugging_p): Use it.
579         (cp_lexer_start_debugging): Likewise.
580         (cp_lexer_stop_debugging): Likewise.
581
582 2016-01-27  Marek Polacek  <polacek@redhat.com>
583
584         PR c/68062
585         * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
586         needed.  Add -Wsign-compare warning.
587
588 2016-01-27  Ryan Burn  <contact@rnburn.com>
589
590         PR cilkplus/69267
591         * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
592         superfluous post_p argument in call to
593         cilk_gimplify_call_params_in_spawned_fn.
594
595 2016-01-27  Marek Polacek  <polacek@redhat.com>
596
597         PR c++/69379
598         * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs
599         wrapped in NOP_EXPRs.
600
601 2016-01-27  Martin Sebor  <msebor@redhat.com>
602
603         PR c++/69317
604         * mangle.c (mangle_decl): Reference the correct (saved) version
605         of the ABI in -Wabi diagnostics.
606
607 2016-01-27  Marek Polacek  <polacek@redhat.com>
608
609         PR c++/69496
610         * constexpr.c (cxx_eval_array_reference): Evaluate the number of
611         elements of the array.
612
613 2016-01-26  Jason Merrill  <jason@redhat.com>
614
615         PR c++/68949
616         * constexpr.c (register_constexpr_fundef): Keep the un-massaged body.
617         (cxx_eval_call_expression): Don't look through clones.
618         * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
619         * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
620         maybe-in-charge *tor.
621
622 2016-01-26  Jason Merrill  <jason@redhat.com>
623
624         PR c++/68782
625         * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT
626         and TREE_SIDE_EFFECTS.
627         (cxx_eval_constant_expression) [CONSTRUCTOR]: Call
628         verify_constructor_flags.
629
630 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
631
632         PR c++/68357
633         * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node,
634         return error_mark_node instead of building trees with error_mark_node
635         operands.
636
637 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
638
639         PR other/69006
640         * error.c (print_instantiation_partial_context_line): Add missing
641         newlines from output for the t == NULL case.
642         (print_instantiation_partial_context): Remove call to pp_newline.
643
644 2016-01-24  Patrick Palka  <ppalka@gcc.gnu.org>
645
646         Revert:
647         2016-01-18  Patrick Palka  <ppalka@gcc.gnu.org>
648
649         PR c++/11858
650         PR c++/24663
651         PR c++/24664
652         * decl.c (grokdeclarator): Don't decay array parameter type to
653         a pointer type if it's dependent.
654         (grokparms): Invoke strip_top_quals instead of directly invoking
655         cp_build_qualified_type.
656         * pt.c (decay_dependent_array_parm_type): New static function.
657         (type_unification_real): Call decay_dependent_array_parm_type
658         to decay a dependent array parameter type to its corresponding
659         pointer type before unification.
660         (more_specialized_fn): Likewise.
661         (get_bindings): Likewise.
662         * tree.c (cp_build_qualified_type): Trivial typofix in
663         documentation.
664
665 2016-01-23  Martin Sebor  <msebor@redhat.com>
666
667         PR c++/58109
668         PR c++/69022
669         * decl2.c (is_late_template_attribute): Handle dependent argument
670         to attribute align and attribute vector_size.
671
672 2016-01-21  Jason Merrill  <jason@redhat.com>
673
674         PR c++/69392
675         * lambda.c (lambda_capture_field_type): Handle 'this' specially
676         for init-capture, too.
677
678         PR c++/65687
679         * decl.c (type_is_deprecated): Don't look into a typedef.
680
681         PR c++/40751
682         PR c++/64987
683         * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN.
684
685         PR c++/43407
686         * decl.c (start_enum): Add attributes parameter.
687         * parser.c (cp_parser_enum_specifier): Pass it.
688         * pt.c (lookup_template_class_1): Pass it.
689         * cp-tree.h: Adjust.
690
691 2016-01-19  Jason Merrill  <jason@redhat.com>
692
693         PR c++/59759
694         * pt.c (convert_template_argument): Handle VAR_DECL properly.
695
696 2016-01-19  Marek Polacek  <polacek@redhat.com>
697
698         PR c++/68586
699         * constexpr.c (clear_cv_cache): New.
700         * cp-gimplify.c (clear_fold_cache): New.
701         * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
702         * decl.c (finish_enum_value_list): Call them.
703
704         PR c++/68965
705         * pt.c (tsubst_copy): Mark elements in expanded vector as used.
706
707 2016-01-18  Patrick Palka  <ppalka@gcc.gnu.org>
708
709         PR c++/11858
710         PR c++/24663
711         PR c++/24664
712         * decl.c (grokdeclarator): Don't decay array parameter type to
713         a pointer type if it's dependent.
714         (grokparms): Invoke strip_top_quals instead of directly invoking
715         cp_build_qualified_type.
716         * pt.c (decay_dependent_array_parm_type): New static function.
717         (type_unification_real): Call decay_dependent_array_parm_type
718         to decay a dependent array parameter type to its corresponding
719         pointer type before unification.
720         (more_specialized_fn): Likewise.
721         (get_bindings): Likewise.
722         * tree.c (cp_build_qualified_type): Trivial typofix in
723         documentation.
724
725 2016-01-18  Jason Merrill  <jason@redhat.com>
726
727         * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
728
729         * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
730
731         PR c++/68767
732         * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify.  Do fold COND_EXPR.
733         (contains_label_1, contains_label_p): Remove.
734
735 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
736
737         PR c++/69091
738         * pt.c (type_dependent_expression_p): For a function template
739         specialization, a type is dependent iff any of its template
740         arguments are.
741
742 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
743
744         * cp-array-notation.c (cp_expand_cond_array_notations): Return
745         error_mark_node only if find_rank failed, not if it was
746         successful.
747
748 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
749
750         PR c++/68936
751         * tree.c (build_min_non_dep_call_vec): Don't retain the
752         KOENIG_LOOKUP_P flag of the non-dependent expression that's
753         been built.
754         (build_min_non_dep_op_overload): Instead, do it here.
755
756 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
757
758         PR bootstrap/68271
759         * parser.h (cp_token): Remove pragma_kind field.  Add comment
760         with number of unused bits.
761         * parser.c (eof_token): Remove pragma_kind field initializer.
762         (cp_lexer_get_preprocessor_token): Don't set pragma_kind
763         field, don't clear CPP_PRAGMA u.value.
764         (cp_parser_pragma_kind): New function.
765         (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
766         cp_parser_omp_construct, cp_parser_initial_pragma,
767         cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
768         pragma_kind field.
769
770 2016-01-15  Jason Merrill  <jason@redhat.com>
771
772         PR c++/68847
773         * call.c (build_cxx_call): Use fold_non_dependent_expr.
774
775         * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
776         value.
777
778         PR c++/69257
779         * typeck.c (decay_conversion): Don't call mark_rvalue_use for
780         array/function-to-pointer conversion.  Call
781         complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
782         * call.c (convert_like_real): Print call context if
783         decay_conversion errors.
784
785 2016-01-14  Tom de Vries  <tom@codesourcery.com>
786
787         PR tree-optimization/68773
788         * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
789         set force_output.
790
791 2016-01-14  Jason Merrill  <jason@redhat.com>
792
793         PR c++/69261
794         * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
795
796 2016-01-12  Marek Polacek  <polacek@redhat.com>
797
798         PR c++/68979
799         * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
800         error_at and adjust the return value.
801
802 2016-01-12  Jakub Jelinek  <jakub@redhat.com>
803
804         PR objc++/68511
805         PR c++/69213
806         * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
807         GS_ERROR whenever seen_error (), only if *expr_p contains
808         cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
809
810         PR c++/66808
811         PR c++/69000
812         * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
813
814 2016-01-11  Jason Merrill  <jason@redhat.com>
815
816         PR c++/69131
817         * method.c (walk_field_subobs): Add dtor_from_ctor parm.
818         (process_subob_fn): Likewise.  Don't consider triviality if true.
819         (synthesize_method_walk): Pass it.
820
821 2016-01-11  David Malcolm  <dmalcolm@redhat.com>
822
823         PR c++/68795
824         * parser.c (cp_parser_postfix_expression): Initialize
825         close_paren_loc to UNKNOWN_LOCATION; only use it if
826         it has been written to by
827         cp_parser_parenthesized_expression_list.
828         (cp_parser_parenthesized_expression_list): Document the behavior
829         with respect to the CLOSE_PAREN_LOC param.
830
831 2016-01-11  Jakub Jelinek  <jakub@redhat.com>
832
833         PR c++/69211
834         * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
835         folded operands have side-effects, but folding changed any of them,
836         build a new tree with the folded operands instead of returning the
837         unfolded tree.
838
839 2016-01-09  Marek Polacek  <polacek@redhat.com>
840
841         PR c++/69113
842         * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
843
844 2016-01-09  Jakub Jelinek  <jakub@redhat.com>
845
846         PR c++/69164
847         * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
848
849 2016-01-08  Jason Merrill  <jason@redhat.com>
850
851         PR c++/69158
852         * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
853         in completion.
854
855 2016-01-08  Marek Polacek  <polacek@redhat.com>
856
857         PR c++/68449
858         * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
859
860 2016-01-08  Jason Merrill  <jason@redhat.com>
861
862         * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
863         workaround.
864
865         PR c++/68983
866         PR c++/67557
867         * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
868         TREE_ADDRESSABLE type.
869
870         PR c++/68983
871         PR c++/67557
872         * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
873
874 2016-01-05  Nathan Sidwell  <nathan@acm.org>
875
876         PR c++/58583
877         * pt.c (build_non_dependent_expr): Don't try a checking fold when
878         parsing an nsdmi.
879
880 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
881
882         Update copyright years.
883 \f
884 Copyright (C) 2016 Free Software Foundation, Inc.
885
886 Copying and distribution of this file, with or without modification,
887 are permitted in any medium without royalty provided the copyright
888 notice and this notice are preserved.